Below is my Ipfw script. I could execute it from console directly and let other hosts inside the same local network access this host.
But when I try to execute this script from a ssh login with putty, all of other hosts are blocked out of this host.
Of course, I still could login at the console.
And I got result as below.
It looks like that only the first rule has been added.
Why the whole script could not run to the end?
Code:
#!/bin/sh
ipfw -f flush
ipfw add 00100 allow ip from any to any via lo0
#ipfw add 00200 deny ip from any to 127.0.0.0/8
#ipfw add 00300 deny ip from 127.0.0.0/8 to any
ipfw add 00400 allow ip from me to any keep-state
ipfw add 00500 allow tcp from any to any 25 in
#private IP
ipfw add 01000 allow ip from 192.168.2.0/24 to any
ipfw add 00200 deny ip from any to 127.0.0.0/8
ipfw add 00300 deny ip from 127.0.0.0/8 to any
But when I try to execute this script from a ssh login with putty, all of other hosts are blocked out of this host.
Of course, I still could login at the console.
And I got result as below.
Code:
ns# ipfw list
00100 allow ip from any to any via lo0
65535 deny ip from any to any
It looks like that only the first rule has been added.
Why the whole script could not run to the end?