MAC Block for the DHCP via iptables
Hi Mr.Antony & ALL ,
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP.........only with those policies ,
should block the all incomming , outgoing from the machine ?????
This firewall running in my DHCP machne , but when a test with my DHCP clients ..........those machone has taken ips. but this can't happen .....isit ? if i correct where can be tbe problem ? pls ..............guide me
thank u all
Quoted 6 lines · Chandana Bandara
Hi Mr.Antony & ALL ,
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP.........only with those policies , should block the all incomming , outgoing from the machine ?????
Assuming you have flushed the rules as well, with:
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
then no IP traffic will be allowed into, out of, or through, the machine.
Quoted 4 lines
This firewall running in my DHCP machne , but when a test with my DHCP clients ..........those machone has taken ips. but this can't happen .....isit ? if i correct where can be tbe problem ? pls ..............guide me
It is important to bear in mind that DHCP is a protocol used for giving IP addresses to clients which don't currently have them, therefore the traffic involved in client requests and server responses will not have normal IP addresses as you might expect, simply because the (client) machines in question don't have IP addresses until the protocol is complete.
A quick inspection with a protocol analyser such as ethereal will easily show you what I mean here.
However, once the clients do have IP addresses, the above rules will certainly prevent them from communicating with, or through, the netfilter box.
If you want to block the ethernet traffic involved in communicating the DHCP packets in the first place you might like to investigate ebtables at
http://ebtables.sf.net instead of iptables, as this is more appropriate to this purpose.
Regards,
Antony.
Signature · 4 lines
Success is a lousy teacher. It seduces smart people into thinking they can't lose. - William H Gates III
Quoted 13 lines · Antony Stone
Quoted 8 lines · Chandana Bandara
Hi Mr.Antony & ALL ,
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP.........only with those policies , should block the all incomming , outgoing from the machine ?????
Quoted 10 lines
Assuming you have flushed the rules as well, with:
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUTthen no IP traffic will be allowed into, out of, or through, the machine.
Chandana, Antony is making a theoretical point here. Your loopback interface uses the OUTPUT chain and dropping every OUTPUT packet could cause some unexpected problems. I wouldn't recommend doing this. If you ever really wanted to block *all* traffic just unplug the network card(s). It's a lot easier and 100% secure. I hope Mr. Curleybaces reads this too or he could be in for a big surprise :-)
Jeff
Quoted 10 lines · Jeffrey Laramie
Quoted 9 lines · Antony Stone
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROPiptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
Quoted 6 lines
Quoted 1 line
then no IP traffic will be allowed into, out of, or through, the machine.
Chandana, Antony is making a theoretical point here. Your loopback interface uses the OUTPUT chain and dropping every OUTPUT packet could cause some unexpected problems. I wouldn't recommend doing this. If you ever really wanted to block *all* traffic just unplug the network card(s).
Very well said, Jeffrey :)
Netfilter rules should never be implemented without understanding what they do, and "blocking all traffic" is an unlikely condition for a working
machine. Apart from anything else, what use is a machine that can't talk or
listen :) ?
Antony.
Signature · 8 lines
Because it completely breaks the way people normally read things.
Why is top-posting bad?
It means writing your reply above whatever you're replying to.
What does top-post mean?
Please don't top-post in email replies.
Please reply to the list;
please don't CC me.Quoted 25 lines · Antony Stone
Quoted 11 lines · Jeffrey Laramie
Quoted 8 lines · Antony Stone
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROPiptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUTQuoted 9 lines
Quoted 3 lines
then no IP traffic will be allowed into, out of, or through, the machine.
Chandana, Antony is making a theoretical point here. Your loopback interface uses the OUTPUT chain and dropping every OUTPUT packet could cause some unexpected problems. I wouldn't recommend doing this. If you ever really wanted to block *all* traffic just unplug the network card(s).
Quoted 5 lines
Very well said, Jeffrey :)
Netfilter rules should never be implemented without understanding what they do, and "blocking all traffic" is an unlikely condition for a working machine. Apart from anything else, what use is a machine that can't talk or listen :) ?
On this side of the pond we call them "paper weights" :p
Jeff