Re: Problems with netfilter

Linux Advanced Routing and Traffic Control

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

 



I have fixed half of the problem with:

iptables -A OUTPUT -t mangle -p tcp --dport 25 -j MARK --set-mark 25
ip rule add fwmark 25 lookup mail
ip route add default via xxx.xxx.xxx.xxx dev ppp0 table mail

Running tcpdump it appears that port 25 traffic is be routed through the
ADSL connection. However, the source IP address appears to be the cable IP
address (cable is the default gateway). I have put SNAT rules in place,
however they don't seem to work.

The SNAT rules I used were:

iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to yyy.yyy.yyy.yyy
and the same thing with the cable connection.

Rememeber, the packets are being generated locally through the mail server
(qmail).
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 17/01/2004

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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