Re: globaly prevent binding on a specific interface

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

 



* Benoit Panizzon <200504201608.48573.benoit.panizzon@xxxxxx> 2005-04-20 16:08
> Here's what I have with the real addresses and interfaces. Not trying to 
> mangle the tunnels yet :-)
> 
> eth0 is connected to the internet.
> eth1 is lan.
> 
> Before:
> 
> magma:~# ip route
> 157.161.57.0/27 dev eth1  proto kernel  scope link  src 157.161.57.1
> 157.161.32.0/21 dev eth0  proto kernel  scope link  src 157.161.34.64
> default via 157.161.32.1 dev eth0
> 
> Well I don't want to see replies from 157.161.34.64 going out via UDP when 
> something is addressed to 157.161.57.1.
> 
> After the change:
> 
> magma:~# ip route
> 157.161.57.0/27 dev eth1  proto kernel  scope link  src 157.161.57.1
> 157.161.32.0/21 dev eth0  scope link  src 157.161.57.1
> default via 157.161.32.1 dev eth0

Your above goal is achieved with this, a UDP deamon bound to :*
accepting a packet for 57.0/27 on eth0 will respond with a source
address of 57.1.

> That looks promising, but does not seam to have any inpact. I still see the 
> packets originating from 157.161.32.1

This is another issue, it is leaving via your default route. Create a
route for the network the packet origins and set src to the address you
want regardless of whether the default route would catch this correctly.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux