I've recently noticed that the firewall on this FreeBSD system has stopped working, so I went to restart it but it keeps giving me an error:
I've tried adjusting my /etc/ipfw.rules file to say /sbin/ipfw (based on which ipfw) instead, but the error just evolves into:
Here's what you need to know:
What am I overlooking here?
Thanks.
Code:
Line 1: bad command `ipfw'
I've tried adjusting my /etc/ipfw.rules file to say /sbin/ipfw (based on which ipfw) instead, but the error just evolves into:
Code:
Line 1: bad command `/sbin/ipfw'
Here's what you need to know:
Code:
[root@amber ~]# /etc/rc.d/ipfw restart
net.inet.ip.fw.enable: 1 -> 0
Starting divert daemons:Flushed all rules.
Line 1: bad command `ipfw'
Firewall rules loaded.
net.inet.ip.fw.enable: 0 -> 1
[root@amber ~]# cat /etc/ipfw.rules
ipfw -q -f flush
ipfw -q add 00100 allow ip from any to any via lo0
ipfw -q add 00220 deny log ip from me to any in
ipfw -q add 00225 deny log tcp from any to any in tcpflags syn,fin
ipfw -q add 00230 check-state
ipfw -q add 00235 deny tcp from any to any in established
ipfw -q add 00240 allow ip from any to any out keep-state
# allow traffic controlling icmp
ipfw -q add 00300 allow icmp from any to any icmptype 3
ipfw -q add 00301 allow icmp from any to any icmptype 4
ipfw -q add 00302 allow icmp from any to any icmptype 11
# allowing services: ftp, ssh, http, dns, identd
ipfw -q add 00501 allow tcp from any to any 21 keep-state setup
ipfw -q add 00502 allow tcp from any to any 22 keep-state setup
ipfw -q add 00503 allow tcp from any to any 53 keep-state setup
ipfw -q add 00504 allow udp from any to any 53 keep-state setup
ipfw -q add 00505 allow tcp from any to any 80 keep-state setup
ipfw -q add 00506 allow tcp from any to any 113 keep-state setup
# allowed ports for users
ipfw -q add 01000 allow tcp from any to any 6000-7005 keep-state setup
ipfw -q add 02000 allow tcp from any to any 10000-40000 keep-state setup
[root@amber ~]# grep '$FreeBSD' /etc/rc.firewall
# $FreeBSD: src/etc/rc.firewall,v 1.47.10.1 2005/11/19 06:06:59 ume Exp $
[root@amber ~]# uname -a
FreeBSD amber.phurix.com 6.2-RELEASE-p12 FreeBSD 6.2-RELEASE-p12 #0: Tue Jul 15 13:49:44 BST 2008
james@amber.phurix.com:/usr/obj/usr/src/sys/SPECIFIC i386
[root@amber ~]# ipfw show
65535 362908031 62053275482 allow ip from any to any
What am I overlooking here?
Thanks.