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

iptables problem with multible routes



Hi List,
I have a problem with iptables (kernel 2.4.18)
and multible routes.

Setup:
My Firewall (FW) has 3 interfaces
eth0 = Internal
eth1 = dedicatet router connection
ppp0 (PPPoE DSL link on eth2)

a kernel default route pointing to ppp0
an a second routingtable (me-prov) with an other default route
pointing to the router connected to eth1.
I have a NAT rule in place for MASQing the networks on eth0.
For the nat Traffic I mark my packets that should use
the me-prov defaulttable with a 0x1

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

works like expected.
The packet gets NATed end send out to eth1.

My problem is when I do the same for localy generated packets
(e.g. the mailserver running on the FW) with
# iptables -t mangle -I OUTPUT 1 -p tcp --dport 25 \
-j MARK --set-mark 0x01

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

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: