Difference between revisions of "Configure Firewall"

From AwkwardTV
Jump to: navigation, search
(add newlines to make clearer in code)
Line 16: Line 16:
 
=Step 3=
 
=Step 3=
 
Create the shell script <tt>fw</tt> in <tt>/Volumes/OSBoot/System/Library/StartupItems/fw/</tt> with the following text:
 
Create the shell script <tt>fw</tt> in <tt>/Volumes/OSBoot/System/Library/StartupItems/fw/</tt> with the following text:
 
+
<pre>
 
  #!/bin/sh
 
  #!/bin/sh
 
   
 
   
 
  /sbin/ipfw -f flush
 
  /sbin/ipfw -f flush
 
  /sbin/ipfw add 65535 allow ip from any to any
 
  /sbin/ipfw add 65535 allow ip from any to any
 +
</pre>
 +
 +
chmod 755 fw

Revision as of 01:00, 27 March 2007

These instructions were taken from the Install SSH article. Disabling the firewall may be necessary for installing additional servers. It is not necessary for allowing SSH access.

Step 1

Create the directory fw in /Volumes/OSBoot/System/Library/StartupItems/.

Step 2

Create the file StartupParameters.plist in /Volumes/OSBoot/System/Library/StartupItems/fw/ with the following text:

{
  Description = "Firewall";
  Provides = ("Firewall");
  Requires = ("Network");
  OrderPreference = "None";
}

Step 3

Create the shell script fw in /Volumes/OSBoot/System/Library/StartupItems/fw/ with the following text:

 #!/bin/sh
 
 /sbin/ipfw -f flush
 /sbin/ipfw add 65535 allow ip from any to any

chmod 755 fw