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

Re: iptables problem with multible routes



On Fri, 2002-07-05 at 12:10, Uwe A. P. Wuerdinger wrote:
 
> 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

What about using SNAT to alter the source IP for packets going trough
eth1?

Something like (from memory - better verify the syntax):

iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source $eth1_ip

HTH
 Markus
-- 
Markus Oswald <moswald@iirc.at>  \ Unix and Network Administration
Graz, AUSTRIA                     \ High Availability / Cluster
Mobile: +43 676 6485415            \ System Consulting
Fax:    +43 316 428896              \ Web Development


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



Reply to: