IPFW rules and how do you know they work

This might sound really stupid but....if the first rule is to allow IP from any to any then how does the firewall work at all? If I remove the first rule then I dont get any access...but...how can I hit the box on say..port 31....and see that its blocked. So far I cant figure that out. IPFW SHOW gives me the info for blocking...but I can only get it to work with localhost attempts.

So...in case my question isnt clear.
1. Do these rules look right?
2. How do you test from remote?


00100 allow ip from any to any via em0
00200 deny ip from any to 127.0.0.0/8
01000 allow tcp from any to any 21
01100 allow tcp from any to any 22
01200 allow tcp from any to any 25
01300 allow tcp from any to any 53
01400 allow tcp from any to any 80
01500 allow tcp from any to any 110
01600 allow tcp from any to any 143
01700 allow tcp from any to any 443
01800 allow tcp from any to any 465
01900 allow tcp from any to any 953
02000 allow tcp from any to any 993
02100 allow tcp from any to any 995
02200 allow tcp from any to any 3306
02300 allow tcp from any to any 8443
03000 allow udp from any to any 27010-27050
03100 allow tcp from any to any 27010-27050
03200 allow tcp from any to any 7002
03300 allow tcp from any to any 5273
65535 deny ip from any to any

 

 

 

 

Top