[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?
Yes.
ip route add 10.1.1.0/24 via 192.168.1.1 src 172.16.1.1
^^^
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 172.16.1.1/32 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.
HTH,
Filipe
More information about the CentOS
mailing list