Skip to contentSkip to conversation

Input chain, traffic from interface lo

DISCUSSION Vesselin Kostadinov 2 participants 2 messages Dec 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

The current "Iptables Tutorial" contains the following lines:

$IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $LO_IP -j ACCEPT $IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $LAN_IP -j ACCEPT $IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $INET_IP -j ACCEPT

where $LO_IFACE is "lo", $LO_IP is "127.0.0.1", $LAN_IP is "192.168.0.2" and $INET_IP is "194.236.50.155".

I fully agree with the first line but I am a bit puzzled by the other 2 lines. Is there any chance packets with source IP other than 127.0.0.1 to come from interface lo?

Thanks in advance

Vesselin

=====
The text below was appended by the mailbox service provider. I should not be held responsible for it. Vesselin.

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

#1 lore raw
Quoted 8 lines · Vesselin Kostadinov

Hi,

The current "Iptables Tutorial" contains the following lines:

$IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $LO_IP -j ACCEPT $IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $LAN_IP -j ACCEPT $IPTABLES -A INPUT -p ALL -i $LO_IFACE -s $INET_IP -j ACCEPT

Quoted 6 lines

where $LO_IFACE is "lo", $LO_IP is "127.0.0.1", $LAN_IP is "192.168.0.2" and $INET_IP is "194.236.50.155".

I fully agree with the first line but I am a bit puzzled by the other 2 lines. Is there any chance packets with source IP other than 127.0.0.1 to come from interface lo?

no. the linux routing code drops packets with source IP != 127.0.0.1 received on lo as a "martian source."

i used to have the actual line in the source code handy, but i'm sure some constructive grepping will get you there.

-j

--
"Look, just give me some inner peace, or I'll mop the floor with ya!"
--The Simpsons