Community discussions

MikroTik App
 
BDISP
newbie
Topic Author
Posts: 35
Joined: Thu Feb 19, 2009 1:24 pm

External To Internal

Mon Mar 23, 2009 2:34 pm

Hello


i have a Public IP like : 203.188.2--.--- and it's set on Router.

now i want to fw it to a internal web server.

i use dst-nat 203.188.2--.--- on port 80 to internal dst-nat 192.168.202.2 on port 80. it dosent work .

but if i use dst-nat 203.188.2--.--- on port 80 to internal dst-nat 74.125.67.100 (google IP ) on port 80 it works.



so what's the problem with my internal ip ?

thanks
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26950
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: External To Internal

Mon Mar 23, 2009 2:39 pm

you need to set up a simple DST-NAT rule that will take care of the redirection. For example:
/ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat to-addresses=192.168.0.109 
(you can also specify certain ports)
 
BDISP
newbie
Topic Author
Posts: 35
Joined: Thu Feb 19, 2009 1:24 pm

Re: External To Internal

Mon Mar 23, 2009 7:29 pm

thanks but it can redirect another ip like google. yahoo but it not redirect in my intrnal ip.



i add this
/ip firewall nat add chain=dstnat dst-address=203.188.242.114 action=dst-nat to-addresses=192.168.202.2

but it can't redirect to 192.168.202.2 it say page not found.

but if i use /ip firewall nat add chain=dstnat dst-address=203.188.242.114 action=dst-nat to-addresses=74.125.67.100 it works

what's the problem ?
pls help me
 
yancho
Member Candidate
Member Candidate
Posts: 207
Joined: Tue Jun 01, 2004 3:04 pm
Location: LV

Re: External To Internal

Mon Mar 23, 2009 7:49 pm

Are you testing from same subnet 192.168.202.0/24? If yes you should add another nat rule for internal traffic!
 
BDISP
newbie
Topic Author
Posts: 35
Joined: Thu Feb 19, 2009 1:24 pm

Re: External To Internal

Mon Mar 23, 2009 8:51 pm

Problem Solved . by adding this

/ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat to-addresses=192.168.0.109
/ip firewall nat add chain=srcnat dst-address=192.168.0.109 action=src-nat to-addresses=10.5.8.200