Community discussions

MikroTik App
 
looka
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Sat Apr 14, 2018 3:33 pm

how does the masquerade work

Sat May 22, 2021 10:20 pm

i know, silly question. "masquerade is a special src-nat for dynamic public IPs".

but, if I have more than one public IP and only one rule, which masquerades all traffic, is it going to work? which IP does the masquerade choose and how?
 
User avatar
Hominidae
Member
Member
Posts: 316
Joined: Thu Oct 19, 2017 12:50 am

Re: how does the masquerade work

Sat May 22, 2021 10:32 pm

...by keeping track of existing connections, once established...these contain IPs and Ports for source and destination.each.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21930
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: how does the masquerade work

Sat May 22, 2021 10:54 pm

I use a masquerade rule per ISP. For example I have one for cable and one for Fiber both dynamic.
one could use an interface-list=WAN , the standard default rule and this will work as well.

As to the second question, sourcenat doesnt tell the router where to send traffic it only tells the router if traffic is going out an interface to assign the outgoing interface public IP to the connection for connection tracking purposes (return traffic). ROUTING decides where traffic is directed.

Who is online

Users browsing this forum: No registered users and 10 guests