[CentOS] OT : iptables/arptables question

Filipe Brandenburger filbranden at gmail.com
Tue Jan 27 16:33:14 UTC 2009

Hi Fabian:

On Tue, Jan 27, 2009 at 08:16, Fabian Arrotin <fabian.arrotin at arrfab.net> wrote:
> Question is : how can i "mangle" output packets to appear coming from
> public ip and not from 192.168.X.X ?

Found this that might help you (google for: linux default outgoing ip):

> On a machine with multiple interfaces, is it possible to set the default
> outgoing IP address to something other than the address for the interface
> on the outgoing route?


ip route add via src
The src parameter tells the routing code to use this address when sending
packets. The address only needs to be on the system. IE:

ip addr add dev dummy0

And send the packets out of eth0.
From: http://lkml.indiana.edu/hypermail/linux/kernel/0112.1/0359.html

Just make sure you keep a separate route for your ISP's side of the
private network (maybe the one created when your interface goes up
will do), otherwise your routing protocol might fail.


More information about the CentOS mailing list