Skip to contentSkip to conversation

Bad Argument `lo'

DISCUSSION Markus Feldmann 2 participants 2 messages Oct 4, 2012

lore
Share & tools
lore
#0 lore raw

Hi All,

i using iptables (version 1.4.14) on a LMDE(Debian like) with kernel 3.5.3. Some days before i watched my logs after several weeks again. :-) And i spotted the error message:

Bad argument `lo'

So i searched at google to get a solution and i got one. Some user told to put the <lo> into ticks, like this

'!lo'

My iptables-rules regarding on this problem were looking so,

...
iptables -A INPUT -i ! lo -s 127.0.0.1 -j DROP
...

and i changed this line to,

...
iptables -A INPUT -i '!lo' -s 127.0.0.1 -j DROP
...

Now i am not sure, if this works correctly. <iptables -L> shows me the device "!lo",

######################################################################
Chain INPUT (policy DROP 0 packets, 0 bytes)

 pkts bytes target     prot opt in     out     source destination
    0     0 LOG        all  --  !lo    any     localhost anywhere 

limit: avg 3/sec burst 5 LOG level warning prefix "Loopback
gespooft: "
0 0 DROP all -- !lo any localhost anywhere
######################################################################

but i am not sure if this works correctly. Does somebody knows if this trick works correctly?

regards Markus

#1 lore raw

Hi,

Quoted 6 lines · Markus Feldmann

Hi All,

i using iptables (version 1.4.14) on a LMDE(Debian like) with kernel 3.5.3. Some days before i watched my logs after several weeks again. :-) And i spotted the error message:

Quoted 6 lines

Bad argument `lo'

So i searched at google to get a solution and i got one. Some user told to put the <lo> into ticks, like this

'!lo'

Nope the solution is given in the man page:
[!] -i, --in-interface name

So you need

	iptables -A INPUT ! -i lo -s 127.0.0.1 -j DROP

BR,

Quoted 33 lines

My iptables-rules regarding on this problem were looking so,

...
iptables -A INPUT -i ! lo -s 127.0.0.1 -j DROP
...

and i changed this line to,

...
iptables -A INPUT -i '!lo' -s 127.0.0.1 -j DROP
...

Now i am not sure, if this works correctly. <iptables -L> shows me the device "!lo",

######################################################################
Chain INPUT (policy DROP 0 packets, 0 bytes)

  pkts bytes target     prot opt in     out     source destination
     0     0 LOG        all  --  !lo    any     localhost anywhere 

limit: avg 3/sec burst 5 LOG level warning prefix "Loopback
gespooft: "
0 0 DROP all -- !lo any localhost anywhere
######################################################################

but i am not sure if this works correctly. Does somebody knows if this trick works correctly?

regards Markus
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Eric Leblond 
Blog: http://home.regit.org/ - Portfolio: http://regit.500px.com/