Community discussions

MikroTik App
 
beepee
Member Candidate
Member Candidate
Topic Author
Posts: 139
Joined: Tue Sep 18, 2007 6:13 am

Masqurading to diffrent IP address

Fri Jul 01, 2011 5:33 pm

Hi guys
I am having problem masquerading diffrent user to different IP addresses
I have an interface that has public 2-IP address
I know that if I use masquerading I will not be able to specify which IP to use so I used the src-nat action of the srcnat chain.
/ip firewall nat add chain=srcnat src-address=192.168.1.1/24 action=src-nat to-addresses=11.11.11.1
/ip firewall nat add chain=srcnat src-address=192.168.2.1/24 action=src-nat to-addresses=11.11.11.2
My question is that do I need to add another dstnat rule to make it work?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Masqurading to diffrent IP address

Fri Jul 01, 2011 5:53 pm

Depends - do you need the Internet to establish connections to the machines? Connections established by 192.168.1.1 and 192.168.2.1 will be just fine, you only need destination NAT if you need inbound connections to work.
 
beepee
Member Candidate
Member Candidate
Topic Author
Posts: 139
Joined: Tue Sep 18, 2007 6:13 am

Re: Masqurading to diffrent IP address

Sun Jul 03, 2011 6:38 pm

Depends - do you need the Internet to establish connections to the machines? Connections established by 192.168.1.1 and 192.168.2.1 will be just fine, you only need destination NAT if you need inbound connections to work.
Thanks fewi, U are right
I just discover that the failover provision on my ISP side was what made my setup seems not funtional.
We've resolved issues.
Thanks for the contribution
 
sleimanr
Member Candidate
Member Candidate
Posts: 176
Joined: Mon Oct 18, 2010 9:31 am

Re: Masqurading to diffrent IP address

Mon Jul 04, 2011 9:03 am

i have same way but 4 dsl lines

/ip firewall nat add chain=srcnat src-address=192.168.1.1/24 action=src-nat to-addresses=11.11.11.1
/ip firewall nat add chain=srcnat src-address=192.168.2.1/24 action=src-nat to-addresses=11.11.11.2
/ip firewall nat add chain=srcnat src-address=192.168.3.1/24 action=src-nat to-addresses=11.11.11.3
/ip firewall nat add chain=srcnat src-address=192.168.4.1/24 action=src-nat to-addresses=11.11.11.4


how could be Nat?

Who is online

Users browsing this forum: mac86 and 12 guests