Community discussions

MikroTik App
 
Centauri
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Sun Jun 06, 2010 8:51 pm

From LAN to LAN via WAN not working (Local loopback) Problem

Tue Jul 06, 2010 1:09 pm

Hello

I have a problem with my RB450G with RouterOS 4.10.

I have a Domain Name where all records lead to my Public IP, where I e.g. have a Web Server.
All external users can get access to my Web Server without any problem. So my routing, DNS and NAT I okay.

But I have at problem when I have a machine on my local network witch tried to get access to my Web Server via my domain name. Then I can’t get access to my Web Server, I can only get access by the Internal IP of the Web Server.
Which is a big problem for me since I have a lot of domain names on the server so I have to be able to connect to the server with the correct domain names so that the Web Server can lead me to the correct Web Site via Host Header.

Before I was using a SmoothWall Firewall where this where no problem, so must be something with how RouterOS handles the traffic from LAN to WAN and back to LAN again.

Can someone help me how to solve this problem ?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: From LAN to LAN via WAN not working (Local loopback) Pro

Tue Jul 06, 2010 4:11 pm

Search the forum for "hairpin NAT" and you will find working solutions.
 
Centauri
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Sun Jun 06, 2010 8:51 pm

Re: From LAN to LAN via WAN not working (Local loopback) Pro

Wed Jul 07, 2010 9:10 am

Thanks

Found a solution that worked with the following commands

ip firewall nat add chain=dstnat action=dst-nat to-addresses=192.168.200.101 protocol=tcp dst-address=!192.168.200.0/24 dst-address-type=local dst-port=80

ip firewall nat add chain=srcnat action=masquerade src-address=192.168.200.0/24 out-interface=Port1_WAN1

ip firewall nat add chain=srcnat action=masquerade protocol=tcp src-address=192.168.200.0/24 dst-port=80
 
mcb
newbie
Posts: 40
Joined: Mon Jul 05, 2010 1:24 am

Re: From LAN to LAN via WAN not working (Local loopback) Pro

Thu Jul 08, 2010 11:01 am

Anyway the right solution is to put 2 network adapters in the server, 1 for LAN and 1 for WAN. All others are for clowns.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: From LAN to LAN via WAN not working (Local loopback) Pro

Thu Jul 08, 2010 4:41 pm

The number of network adapters has absolutely nothing to do with this issue.