Skip to content

Instantly share code, notes, and snippets.

@xaviervia
Created August 19, 2012 00:54
Show Gist options
  • Select an option

  • Save xaviervia/3390651 to your computer and use it in GitHub Desktop.

Select an option

Save xaviervia/3390651 to your computer and use it in GitHub Desktop.
Nice and short: how to redirect Port 4567 into 80 in Ubuntu
# Because you want to run Ruby as a regular user and not as root, don't you?
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 4567
# Source: http://serverfault.com/questions/112795/how-can-i-run-a-server-on-linux-on-port-80-as-a-normal-user?answertab=votes#tab-top
@xaviervia
Copy link
Author

Same in Mac OS X:

sudo ipfw add 100 fwd 127.0.0.1,4567 tcp from any to any 80 in

@lbertenasco
Copy link

BUMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment