Hi
I need some help setting up nat on a router with routeros 6.35.4 with several ip addresses. For testing purposes has the router been reseted and the client has been configured with fix ip address 192.168.88.2, gateway 192.168.88.1 and dns 8.8.8.8.
From the provider I get a fix IP address through their dhcp:
IPv4 WAN IP: 10.20.30.244 (fix)
IPv4 WAN Gateway: 10.20.30.1
I also have an IPv4 range from the provider and traffic to those adresses gets routed to the fix address above, the network is:
1.2.3.24/29
Now, since I want to be able to accept incoming connections as well as being seen from the outside as the address 1.2.3.26, I set the following nat rules (the /32 on the ip address is on purpose, since somewhere I read there might be problems otherwise, setting the /29 ip/network instead did not change anything) according to the documentation:
/ip address add address=1.2.3.26/32 interface=sfp1
/ip firewall nat add chain=dstnat dst-address=1.2.3.26 action=dst-nat to-addresses=192.168.88.2
/ip firewall nat add chain=srcnat src-address=192.168.88.2 action=src-nat to-addresses=1.2.3.26
The incoming destination nat seems to work fine, at least I can connect to the machine in question through the address 1.2.3.26. The problem is the source nat rule. On the router I see the traffic coming in, but either it does not get forwarded correctly, or my provider is not routing the packets as they should.
If I change the last line to the following, everything gets routed as it should (with the wrong ip address, of course):
/ip firewall nat add chain=srcnat src-address=192.168.88.2 action=src-nat to-addresses=10.20.30.244
So, my question is, am I missing something important here (firewall rule, routes, forwarding, etc) or could my provider have configured it incorrectly on their end?
Thanks, Moskito