[SOLVED] Internet access webserver behind routeros
Posted: Wed Mar 20, 2013 11:28 pm
I know this topic has been up a lot in this forum, I've read about 10-15 different threads about it, also the wiki-pages.
However I need some guidance.
I have several servers behind the router, a RB2011UAS-2HnD-IN.
It is connected in the following way
Public IP (DHCP from ISP) - ether 1
ether 2 - L2 Switch.
So what I want to do is to let users access my servers behind the router, in some of the forums they are mentioning the given WAN Ip from the ISP.
However, since I only get IP from DHCP it could change any day which won't be so nice as I would have to manually (or script something) to update the rules.
As I gathered this is how such port "opening" should look like:
But that only disabled my ability to access the web from my LAN.
Are there any firewall rules I need to set or anything?
This is the output from my router:
I've not added any NAT here as they didn't work at all for me.
I have also heard about Hairpin NAT, but it looks as it require a static WAN IP as well.
Are there firewall rules I need to add / remove and / or NAT rules?
Thanks in advance.
However I need some guidance.
I have several servers behind the router, a RB2011UAS-2HnD-IN.
It is connected in the following way
Public IP (DHCP from ISP) - ether 1
ether 2 - L2 Switch.
So what I want to do is to let users access my servers behind the router, in some of the forums they are mentioning the given WAN Ip from the ISP.
However, since I only get IP from DHCP it could change any day which won't be so nice as I would have to manually (or script something) to update the rules.
As I gathered this is how such port "opening" should look like:
Code: Select all
chain=dstnat action=dst-nat to-addresses=10.0.10.10 to-ports=80 protocol=tcp dst-port=80
Are there any firewall rules I need to set or anything?
This is the output from my router:
Code: Select all
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s tcp-close-wait-timeout=10s tcp-established-timeout=1d tcp-fin-wait-timeout=10s \
tcp-last-ack-timeout=10s tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall filter
add action=accept chain=input comment="default configuration" disabled=no protocol=icmp
add action=accept chain=input comment="default configuration" connection-state=established disabled=no
add action=accept chain=input comment="default configuration" connection-state=related disabled=no
add action=drop chain=input comment="default configuration" disabled=no in-interface=sfp1-gateway
add action=drop chain=input comment="default configuration" disabled=no in-interface=ether1-gateway
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" disabled=no out-interface=sfp1-gateway
add action=masquerade chain=srcnat comment="default configuration" disabled=no out-interface=ether1-gateway to-addresses=0.0.0.0
I have also heard about Hairpin NAT, but it looks as it require a static WAN IP as well.
Are there firewall rules I need to add / remove and / or NAT rules?
Thanks in advance.