I’m using a Mikrotik RB750. Since my customer’s requests are little complicated i would appreciate your help.
Here is the situation :
there ia a office LAN, and a server machine generates 10 different TCP services. Now, I already have configured 10 public IP from my ISP & I need to
redirect each service via each IP.
e.g :
server lan ip >> service tcp 55 >> public IP 1
server lan ip >> service tcp 66 >> public IP 2
server lan ip >> service tcp 77 >> public IP 3
.
.
.
server lan ip >> service tcp nn >> public IP 10
Set up destination nat to specific IP address
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=<public IP 1>
protocol=tcp to-addresses= to-ports=55
i tried like that, but it does not succeed !
my public ips are set one after one to the wan int. and i can ping all of them. (same subnet, same gateway)
when configuring in such way, these requests are redirected in internet via the first public ip (even i’d applied the dst.-nat chain/ per each) !!
you need to configure 1:1 mapping, you’ve done it only one direction (dest nat) , and also you need to configure reverse direction natting using source nat..
thanks for your comment, but let me describe in detail the situation :
My ISP has provided to me 8 public IPs. I did configured them (put all ip addresses to a single ether interface, since they belong to the same
metmask &gateway).
i.e : 4.2.2.3 - 4.2.2.11
I am using a webserver with 1 IP address (i.e 10.10.10.3/24) into office LAN.
Now, what I need isto redirect 8 server’s services in internet via 8 different public IPs.
so up to now, i tried also your suggestions and the result is that server’s services goes out in internet via the same public IP even i did exactly dest. &source port mapping !
mr.
i am new to this forum and, as far as you can understand i am looking emergently for a solution !
please ignore the fact i did asked to another topic, if you find it unsense
That still shows the rule with the ‘masquerade’ action on top of everything else.
From the other thread I linked to:
Your rules aren’t in the right order. If the masquerade comes first then it is executed and traffic never goes to the more specific rules. Always order NAT rules from more specific to less specific. If you’re still unsure, post your ruleset.
Move that rule to the bottom of everything. Then try again.