Re: [LARTC] DNAT rare problem...

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there Mac,

[ nicely drawn map snipped ]

[ succinct NAT tables snipped ]

 : From Internet (wan site), I can reach without problems the Sendmail
 : server host, making ping to 20.5.90.195, and open port 25.

Seems correct.

 : From Lan side (hosts 192.168.102.1 or 192.168.102.2), I can ping to
 : 20.5.90.195 but I can't to open port 25...

Interesting.  I wouldn't expect that to work at all.

 : (but sometimes, I can do it !!)

Even more interesting....

Is the linux NAt/masq router perhaps not suppressing ICMP redirects?

 : What happen ????????

I'd suggest using DNAT for packets on the way in from the internal network
(your existing rules should take care of this), and using SNAT for packets
destined for the sendmail box from the internal network.

  iptables -t nat -s 192.168.102.0/24 -d 20.5.90.195 -p tcp --dport 25 \
    -j SNAT --to-source 192.168.100.254

-Martin

P.S., A far better solution would be to use split-horizon DNS and have the
      internal hosts connect to the private IP address.


-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@xxxxxxxxxxxxxx



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux