routing between local addresses using an external network

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

 



Hi,
    I have two tun interfaces on my box and I was trying to route
packets between the two local addresses through a "userspace router"
hooked up to the file descriptors of the tun devices. I see the packet
appearing on both the interfaces (using tcpdump -i) but my (udp)
server listening for my packets on a particular port doesn't get any
of them. I force the packets to not take the localhost route by
explicitly specifying the interface on which I want the packet to be
sent (I think socat udp4:<dest addr>:<port>,interface=<ifname> ...)
does it using setsockopts() ).
    In other words it seems that if linux receives a packet through an
interface (not the loopback) which has a src address equal to one of
the local addresses then the packet is not sent to the server
listening for it. Is there a way to work around this?
    Searching for this on the web gave me a pointer to a mail in which
routing packets through an ethernet crossover (between two NICs
connected to the same computer) was discussed. It seems that there is
a small patch for it, but I was hoping if somebody had tricks to do it
using configuration changes (routing, /proc/sys settings etc) only.

Thanks for your attention!
Ritesh
--
http://www.cs.unc.edu/~ritesh/
-
: 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