Community discussions

MikroTik App
 
rroca@guifi
just joined
Topic Author
Posts: 6
Joined: Fri Dec 09, 2005 11:18 pm

src-nat with to-addresses being ignored?

Mon May 07, 2007 12:16 am

I'm having a hotspot with a pool of adressess (192.168.1.0/24) on Router A (RouterOS 2.9.42)
This router has a public IP (1.1.1.1) and communicates with another router B with another public IP address (1.1.2.1) by cable, both routers are linked by cable with another internal network (172.16.0.1/30 and 172.16.0.2/30).
Routes are dynamically sent (BGP)
So routes at the Rouer A go through 172.16.0.2 (Router B)

Given the fact that 192.x.x.x and 172.x.x.x are both internal networks, the IP addresses at the hotspot are intended to be nated to the public IP address 1.1.1.1 by doing
/ ip firewall nat
add chain=srcnat src-address=192.168.1.0/24 action=src-nat to-addresses=1.1.1.1 to-ports=0-65535 comment="" disabled=no
However, i do see that the source address inside the hotspot (192.168.1.0/24) are being nated to 172.16.0.1 instead of 1.1.1.1 !!?? :(

What's wrong here?

Edited If I do a simple NAT without a hotspot, it works. Looks like while using a Hotspot is doing a masquerade by his own and does not follow the rules at "/ip firewall nat" ??
 
ptsip
newbie
Posts: 43
Joined: Fri Jan 20, 2006 7:17 pm

Mon May 07, 2007 8:32 pm

If you activate Hotspot, to see dynamic rule for hotspot, pls :

/ip firewall nat print dynamic
 
rroca@guifi
just joined
Topic Author
Posts: 6
Joined: Fri Dec 09, 2005 11:18 pm

got it!

Wed May 09, 2007 12:27 am

I found where the problem was
The hotspots users where taking the IP of the transparent-proxy, and I was doing NAT just for the hotspot pool adfdresses, not the internal addresses.
So I just had to src-nat the addresses for the link network and it worked :)

Who is online

Users browsing this forum: yhfung and 19 guests