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

Re: iptables problem with multible routes



Jean Christophe ANDRÃ0/00 wrote:

mlist-debianfirewall@x-tec.de écrivait :

The packed got routed out to eth1, as expected but has the Source IP of
ppp0. What can I do to get that packets the right source IP for eth1


Check your NAT rule: you probably need to precise the output interface as
"-o ppp0" to only NAT when it goes thought the DSL line.


NOP that would break the NATing of the internal traffic that should go out to eth1:

iptables -t mangle -I PREROUTING 4 -p tcp -i eth0 --dport 22 \
-j MARK --set-mark 0x01



To clear things up a bit

most traffic from 192.168.x.x gets NATed and goes out to ppp0
some traffic from 192.168.x.x gets Nated and goes out to eth1
FW local traffic like SMTP, DOMAIN, SSH, IPv6 (6 in 4) tunnle doesn't needs NAT and should go to eth1.
When I use the -t mangle OUTPUT to mark the packets so that the use the
default route on eth1 they go out on eth1 put with the source IP of ppp0

Regards, J.C.


greets Uwe
--
X-Tec GmbH
Institute for Computer and Network Security
WWW : http://www.x-tec.de/



--
To UNSUBSCRIBE, email to debian-firewall-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: