FreeBSD Stop IPFW Firewall

by on February 6, 2008 · 2 comments· LAST UPDATED November 18, 2008

in , ,

Q. How do I IPFW firewall in FreeBSD using a shell prompt or over remove ssh login?

A. ipfw is a FreeBSD IP packet filter and traffic accounting facility. Its ruleset logic is similar to many other packet filters except IPFilter.

The IPFW stateless rule syntax is empowered with technically sophisticated selection capabilities which far surpasses the knowledge level of the customary firewall installer.

IPFW is the default firewall in FreeBSD. If you can't reach your FreeBSD server, it is a good idea to stop the firewall first to see if the firewall is the problem.

FreeBSD command to stop IPFW Firewall

To stop the firewall, issue the command:
# /etc/rc.d/ipfw stop
To disable firewall remove following line from /etc/rc.conf file:
firewall_enable="YES"
OR set it as follows:
firewall_enable="NO"

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Leo October 9, 2012 at 7:26 pm

With IPFIREWALL enabled in my kernel, I had to put this in /etc/sysctl.conf:

net.inet.ip.fw.enable=0
net.inet6.ip.fw.enable=0

Reply

2 Leo October 9, 2012 at 9:45 pm

I made a typo in my previous comment:
in /etc/sysctl.conf I also need:

net.inet.ip.fw.enable=0
net.inet6.ip6.fw.enable=0

Reply

Leave a Comment

Tagged as: , , , , , , , ,

Previous Faq:

Next Faq: