Linode Forum Index Linode Forum
Linode Community Forums
 


Firewall query

Click here to go to the original topic

 
       Linode Forum Index -> Linux Networking
Author Message
Xenshine



Joined: 01 Mar 2009
Posts: 20

Posted: Mon Nov 08, 2010 7:23 am    Post subject: Firewall query  

I'm modifying an iptables script but there are a few bits I'm not certain about.
These two variables are defined

Code: LO_IFACE="lo"
LO_IP="127.0.0.1"

So the loopback address is 127.0.0.1... but I don't understand the LO_IFACE="lo" bit

Here is an example of where these are referred to in a rule

Code: iptables -A INPUT -p ALL -i $LO_IFACE -s $LO_IP -j ACCEPT

So instead of defining these variables you could put 127.0.0.1 for LO_IP, but what would you put for LO_IFACE?

Does this even make any sense??
Back to top  
rsk



Joined: 24 Nov 2009
Posts: 306

Posted: Mon Nov 08, 2010 9:41 am    Post subject:  

lo (lowercase LO) is the "network interface" used for loopback.
In easy terms, think of it as of a virtual network card, that's connected to the loopback only.
Just like eth0, eth1, eth2 are Ethernet cards, ppp0...pppX are PPP interfaces, and so on.
And, you'd put "lo" instead of $LO_IFACE, obviously.
Back to top  
 
       Linode Forum Index -> Linux Networking
Page 1 of 1