Greetings all,
I am trying to route the pubic IP address of my Mikrotik router v2.9.5 to a webserver on the internal network. However unsuccessful as of yet. The Public IP given to me from my provider funily enough ends /24 and my internal network say 10.11.19.0/24.
I have tried to configure using the example in the 2.9 manual using my own IP addresses where applicable. without using the NAT rule when i load the webpage with the public IP i get the mikrotik webpage, however when i apply the NAT rule, no page will loads at all.
Also I should mention that i have my network mascaraded behind the public IP.
I have made this work when you have a separate LAN (DMZ) for your internet facing servers, but never really got it working right … cisco calls this ‘nat on a stick’ - maybe something similiar needs to be configured on mt as well.. anyhow, putting those servers on a different subnet or interface should help.
i can’t get this work ..
i want that all addresses to be natted to xx.xxx.xx.x and all ports but it doesn’t work.. on 2.8 it worked.. but i don’t know why on 2.9 it doesen’t :S
Are you trying to map a bunch of private IPs to one public IP for outbound traffic, or are you trying to map public IPs to private IPs so traffic can get inside your private network?
when I goto whatismyip.com with any PC other than 192.168.0.47 I get xx.59.194.58 as my address, my WAN IP in the router. When I use the PC at 192.168.0.47 I get xx.59.194.57 as the response.
ip address> print
Flags: X - disabled, I - invalid, D - dynamic
ADDRESS NETWORK BROADCAST INTERFACE
0 ;;; WAN IP
xxx.59.194.58/24 xxx.59.194.0 xxx.59.194.255 public
1 ;;; ip for internal PC
xxx.59.194.57/24 xxx.59.194.0 xxx.59.194.255 public
ip firewall nat> pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat src-address=192.168.0.47 action=src-nat to-addresses=xxx.59.194.57 to-ports=0-65535
ip route> pr
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf
DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE
0 ADC 10.20.7.0/24 10.20.7.1 hotspot
1 ADC xx.59.194.0/24 xx.59.194.58 public
2 ADC 192.168.0.0/24 192.168.0.10 private
3 A S 0.0.0.0/0 r xxx.59.194.1 public
When I go to http://65.XX.XX.203:8021/ I see the Bytes and Packets increase for the dst-nat rule but nothing for either src-nat rule. Connections shows a “syn sent” for the 65.XX.XX.203 address but nothing shows at all for 192.168.1.21.
I can ping the IP and even connect to port 80 from the router using telnet. But trying to reach the web server from an external address isn’t working.
What about your firewall rules? In order to perform correct mapping it is not only necessary to use src-nat correctly, but also have appropriate firewall filter rules.
When I assume your forward rules allow only outgoing connections from internal network and established and related connections from internet to internal network, it is necessary to add appropriate rules.
No filter rules have been defined. Didn’t read about having to modify and filter rules in the manual for destination NAT. Masquerading works fine. Is there something else I have to add?