Sample Port Forwarding Script

Download Last Updated 4/17/02

***What it is

If you’re administering a Frontier server on OSX, you need a way to set up port forwarding at startup. This archive contains a startup item that will set up portforwarding for all your machines ip addresses from port 80 to port 8080.


Download. Get a command line prompt in the download directory. Use the following commands:

cd /Library/StartupItems 

if the cd command fails, type

sudo mkdir /Library/StartupItems
cd /Library/StartupItems 

Then type (replace /path/from/pwd with the path that is printed by the pwd command)

sudo tar -xvzf /path/from/pwd/portForward8080.tgz

This will expand the archive in the correct location to be execute on startup. If you want to, look at the script that is run (/Library/StartupItems/Multihoming/Multihoming ) to make sure that I’m not doing anything nasty to you.

Restart your machine to test that the command has been run properly. To check to see that it has been installed, run ‘ipfw show’ from a command prompt, and you chould see something like

[tibaby:~] erics% sudo ipfw show
00101        7        665 fwd,8080 tcp from any to any 80 in
65535 12709 53678 allow ip from any to any

The first line is the rule that was inserted, the second line is the default firewall configuration.

No comments

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.