This firewall script works flawlessly for me. Which is fantastic.
However, I want to dig into it, and see exactly what's happening (damn curiosity. Hey, wher's my cat?) anyway, I can't seem to undo this monster at all.
I try:
Code: Select all
[doorman:~] > /sbin/iptables -F
[doorman:~] > /sbin/iptables -X
[doorman:~] > /sbin/iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy DROP)
target prot opt source destination
[doorman:~] > ssh (somewhere else known to work)
ssh: (location): Temporary failure in name resolution
[doorman:~] > ping yahoo.com
ping: unknown host yahoo.com
[doorman:~] > ping 128.138.240.1
PING 128.138.240.1 (128.138.240.1) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
I don't understand why that would happen at all.
I even try running the script from your FIRST HOW-TO which just kinda gets everything up and running. Even if I completely shutdown the machine and make sure the iptables-restore is empty, I still can't get to the outside world.
I don't understand how that's possible, but then again, I don't understand what's happening within this script anyway. It seems to me that the only non /sbin/iptables commands that are entered are the envirnment variables and echo 1/0 > /proc/**** commands. I've tried matching these to other linux boxes I have, but nothing seems to work.
Anyone have any ideas?
I mean, I do have a working firewall, but I can't really change it, and I don't understand what's going on. These 2 things are bugging the crap out of me.
[edit]
Oh, here may be a hint for those that know more than me (everyone): I ran your big script above with bash's debug flag (-x) on, and I noticed the following:
Code: Select all
+ /sbin/iptables -N DROPl
+ /sbin/iptables -A DROPl -j LOG --log-prefix DROPl:
+ /sbin/iptables -A DROPl -j DROP
+ /sbin/iptables -N REJECTl
+ /sbin/iptables -A REJECTl -j LOG --log-prefix REJECTl:
+ /sbin/iptables -A REJECTl -j REJECT
iptables: No chain/target/match by that name
No chain by that name? That seems strange.
BTW, I have read the above posts, but that doesn't necessarily mean that I haven't missed something ridiculously embarrassing. You don't have to be gentle at all.
[/edit]
Anyway, thanks guys. This is clearly the best forum in existence.
