Syed Jahanzaib Personnel Blog to Share Knowledge !

January 29, 2012

Mikrotik Port Forwarding to Local Server on LAN

Filed under: Mikrotik Related — Syed Jahanzaib / Pinochio~:) @ 9:50 AM

If you want to host any web server (or any other service like RDP or Game Server) behind mikrotik server and you want it to be publicly available for all internet users, you can use port forwarding and create one dstnat rule as below.Just make sure this rule comes above any masquerading rule.

Scenario:

DSL MODEM WAN IP = 221.xxx.xxx.xxx
DSL LAN IP = 192.168.1.1

MIKROTIK WAN IP = 192.168.1.2
MIKROTIK LAN IP = 192.168.0.1

WEB SERVER IP = 192.168.0.50

First setup port forwarding in your dsl modem to forward port 80 request to your mikrotik, I am not showing DSL modem config, as its very different for every mode, search for your modem confg page on howto do port forwarding. Just an example here for my Wi.Fi MODEM page.

Then in mikrotik , add an rule to forward port 80 request to your local web server, (one that is hosted behind your mikrotik server, on local user LAN)

MIKROTIK RULE :

/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-port=80 in-interface=WAN2-QUBEE protocol=tcp to-addresses=192.168.0.50 \
to-ports=80

The above rule result would be something like below.

Regard's
Syed Jahanzaib

1 Comment »

  1. my client needs to setup a cctv on his office
    here is my network config.

    Client wireless router IP (wisp mode) = 192.168.150.53
    Client wireless router internal IP (dhcp) = 192.168.1.2 – 192.168.1.254

    i already port forward the port 37777 IP 192.168.1.8 in client router

    MIKROTIK Bridge IP = 192.168.200.4
    ( i didnt set ip for seperate wan & lan, instead of that , i add both interfaces on the bridge.)

    AAA server IP = 192.168.150.1 (bandwidth controlling)
    Wan IP = 59.144.xxx.xxx

    how could i config in my mikrotik router.
    help me
    thanks in advance.

    Comment by tamilmaran — January 29, 2012 @ 6:41 PM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 142 other followers