Community discussions

MikroTik App
 
User avatar
zernz
just joined
Topic Author
Posts: 24
Joined: Fri Mar 25, 2011 12:34 am

web server behind mikrotik

Wed Jan 09, 2013 7:55 am

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?
 
rjscomms
Member Candidate
Member Candidate
Posts: 132
Joined: Fri Jan 28, 2011 12:22 pm

Re: web server behind mikrotik

Wed Jan 09, 2013 10:15 am

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.
 
rdc
just joined
Posts: 10
Joined: Wed Jan 09, 2013 3:40 am

Re: web server behind mikrotik

Wed Jan 09, 2013 11:29 am

/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.
 
User avatar
zernz
just joined
Topic Author
Posts: 24
Joined: Fri Mar 25, 2011 12:34 am

Re: web server behind mikrotik

Wed Jan 09, 2013 11:51 am

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?
 
rdc
just joined
Posts: 10
Joined: Wed Jan 09, 2013 3:40 am

Re: web server behind mikrotik

Wed Jan 09, 2013 2:58 pm

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.
 
User avatar
zernz
just joined
Topic Author
Posts: 24
Joined: Fri Mar 25, 2011 12:34 am

Re: web server behind mikrotik

Wed Jan 09, 2013 7:15 pm

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.

:)