Page 1 of 1

Port forwarding for Webserver

Posted: Wed May 31, 2017 2:07 pm
by Grafschafter
x-----------------x x-----------------x
x Fritzbox x x Mikrotik Router x ------------- Webserver
x x ---------------x x
x x x x
x-----------------x x-----------------x

Konfiguration
Fritzbox IP Adresse = 192.168.12.254
Mikrotik Router Ip Adresse = 192.168.12.182

Behind the Mikrotik Router runs a 192.168.13.0/24 network

I now want to get out of the net the 192.168.12.0/24 network the web server 192.168.13.10 on port 80.
What rules should be set up in the firewall

Re: Port forwarding for Webserver

Posted: Thu Jun 01, 2017 1:35 am
by matiaszon
It would be much easier if you post your config from MikroTik. Anyway, will try to guess a bit and you confirm or correct.

I understand, that your Fritzbox works as a modem, connects to the Internet and has some IP assigned to it's WAN port. Generally it looks as below

[INTERNET] ----- [WAN IP - FritzBox - LAN 192.168.12.254] --- [192.168.12.182 MikroTik NAT - 192.168.13.0/24]

I believe that:
1) your FritzBox has public IP assigned to it's WAN,
2) you have set DMZ for MikroTik (if it's natting the traffic on your network) or at least forwarded port TCP 80 to MikroTik's IP (192.168.12.182).
Then you can visit THIS PAGE, look at the example called "Port mapping/forwarding" and adopt the line to your requirements:
/ip firewall nat add chain=dstnat dst-port=1234 action=dst-nat protocol=tcp to-address=192.168.1.1 to-port=1234