Page 1 of 1

web server behind mikrotik

Posted: Wed Jan 09, 2013 7:55 am
by zernz
hello...

I have problem

this is my network :
internet ----- (pppoe-client) mikrotik (lan) ------ webserver and client

I tried using nat, but when I try access my internet address (not from my network), it keeps access the mikrotik web not my web server.


Any idea?
what is the config in nat?

Re: web server behind mikrotik

Posted: Wed Jan 09, 2013 10:15 am
by rjscomms
Hi Zernz,

have a look at this.

http://wiki.mikrotik.com/wiki/Forwardin ... nternal_IP

Modify the port number to your port number (probably 80) and the IP address to your server IP.

Remember to change the port number for Mikrotik web access to something else under IP -> services

Have fun.

Re: web server behind mikrotik

Posted: Wed Jan 09, 2013 11:29 am
by rdc
/ip firewall nat add protocol=tcp dst-port=<change this to you
r port accepting connection from the internet e.g 80> chain=dstnat action=dst-nat to-add
resses=<change this to the ip of your internal web server> to-ports=<port of your internal server e.g 80>

Please note that port 80 is used by Mikrotik so if you're going to perform destination nat on port 80, your routerOS web admin interface wont be accessible outside your network - only in your internal network. You should still be able to use winbox to manage your routerOS though.

Re: web server behind mikrotik

Posted: Wed Jan 09, 2013 11:51 am
by zernz
I've tried that, the nat configuration. And change the www service to port 81.

Still, I cant access my web server from internet. :(


Is it ok if I dont put any gateway address on my web server machine?

Re: web server behind mikrotik

Posted: Wed Jan 09, 2013 2:58 pm
by rdc
It must have gateway of course or else it wouldn't know where to pass the data. Also, make sure that your mikrotik is reachable from the web server and vice versa. Please provide your
/ip firewall nat print
output if you don't mind.

Re: web server behind mikrotik

Posted: Wed Jan 09, 2013 7:15 pm
by zernz
It must have gateway of course or else it wouldn't know where to pass the data. Also, make sure that your mikrotik is reachable from the web server and vice versa. Please provide your
/ip firewall nat print
output if you don't mind.

oh I see.
Now I know why I cant access my web server from internet. Because the web server dont have any gateway.
Thanks for your help.

:)