Re: Redirecting traffic away from loopback

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

 



Hello,

Nikola Knezevic a écrit :

is it possible with iptables to redirect all the traffic to go to the network interface, instead of the loopback?

Note that the loopback /is/ a network interface. Do you mean a physical interface ?

I have two virtual interfaces, eth0:1 (10.0.0.1) and eth0:2 (10.0.0.5).

These are IP aliases, not virtual interfaces.

When a process sends a packet from 10.0.0.1 to 10.0.0.5, I would like to ship that packet to the gateway, which will return the packet back to this machine. Is this possible with iptables?

This is not possible with a standard kernel. Even though it may be possible thanks to some kernel patches (maybe the ROUTE hack from netfilter's patch-o-matic, use at your own risk), you would run into trouble when the packet is received back : the IP stack discards packets with a local source addresse received on a non-loopback interface.

Also, can I do the same thing now just for IP, but for ICMP?

Huh ? What do you mean ?

--
To unsubscribe from this list: 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