DNAT to localhost

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

 



Hi !
I am stuck with a redirection problem :

I have a POP3-Server wich can only bind on 0.0.0.0 or a single ip-adress. My
machine has two internal  ip-adresses (192.168.10.1 and 192.168.20.1) the
POP3-Server needs to listen on and one external address it musn't listen on.
So i thought : "No problem, i will make the POP3-Server bind to
localhost:110 and redirect incoming traffic to the two ip-adresses
192.168.10.1 and 192.168.20.1 to localhost:110". I made the following
ruleset for it :

iptables -t nat -I PREROUTING -p tcp -i eth0 -d 192.168.10.1/32 --dport 110
-j DNAT --to-destination 127.0.0.1
iptables -t nat -I PREROUTING -p tcp -i eth0 -d 192.168.20.1/32 --dport 110
-j DNAT --to-destination 127.0.0.1

But it doesn't work. Wenn i try to connect to 192.168.10.1 Port 110 from a
client nothing happens.
"iptables -t nat -L PREROUTING -v" shows me that the packets have been
matched by the rules (the counters are up)

What wen't wrong ? 


Thanks

Kai


Mit freundlichen Grüßen

Kai Steverding	

GWS Gesellschaft für Warenwirtschafts-Systeme mbH
Krögerweg 10 - 48155 Münster - Germany
eMail: mailto:steverding@xxxxxx
Telefon: +49 251 7000-02 / Fax -3910
Besuchen Sie uns im Internet: http://www.gws.ms____








[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux