Re: OT : iptables/arptables question

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



Hi Fabian:

On Tue, Jan 27, 2009 at 08:16, Fabian Arrotin <fabian.arrotin@xxxxxxxxxx> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux