Editing Firewall

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 24: Line 24:
 
The old way defined by TrueOS allows you to define the firewall rules via a /etc/ipfw.conf file.  You have to create that file as it does not exist by default.<br/>
 
The old way defined by TrueOS allows you to define the firewall rules via a /etc/ipfw.conf file.  You have to create that file as it does not exist by default.<br/>
  
However, OpenRC (main branch) defines the firewall rules within the '''/etc/ipfw.rules''' file itself.<br/>
+
However, OpenRC (main branch) defines the firewall rules within the /etc/ipfw.conf file itself.
If the file does not exist on GhostBSD you have to create it.
+
 
+
See examples:
+
* [https://gist.github.com/nileshgr/5990712 Nilesh on Github]
+
* [https://unixguide.net/freebsd/fbsd_installguide71/06.09.4-IPFW_Rule_Sets.htm unixguide]
+
* [https://sirtoffski.github.io/docs/freebsd-ipfw/ ipfw.rules]
+
  
 
See: [https://github.com/OpenRC/openrc/blob/master/conf.d/ipfw ipfw on OpenRC]
 
See: [https://github.com/OpenRC/openrc/blob/master/conf.d/ipfw ipfw on OpenRC]
  
==IPFW Script==
+
==Settings==
 
  #!/sbin/openrc-run
 
  #!/sbin/openrc-run
 
  name="ipfw"
 
  name="ipfw"
Line 70: Line 64:
 
  ebegin "Starting $name"
 
  ebegin "Starting $name"
 
  # set the firewall rules script if none was specified
 
  # set the firewall rules script if none was specified
  [ -z "${firewall_script}" ] && firewall_script='''/etc/ipfw.rules'''
+
  [ -z "${firewall_script}" ] && firewall_script=/etc/ipfw.rules
 
  if [ -r "${firewall_script}" ]; then
 
  if [ -r "${firewall_script}" ]; then
 
  /bin/sh "${firewall_script}" "${_firewall_type}"
 
  /bin/sh "${firewall_script}" "${_firewall_type}"

Please note that all contributions to GhostBSD Wiki are considered to be released under the Creative Commons Attribution (see GhostBSD Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Template used on this page: