Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created August 4, 2011 13:55
Show Gist options
  • Save terrancesnyder/1125199 to your computer and use it in GitHub Desktop.
Save terrancesnyder/1125199 to your computer and use it in GitHub Desktop.
Zypper on OpenSuse 10
zypper service-add -repo http://download.opensuse.org/repositories/server:/http/SLE_10/
zypper install haproxy
zypper service-add -repo http://download.opensuse.org/repositories/utilities/SLE_10/
zypper install htop
@terrancesnyder
Copy link
Author

Saving iptables
If you were to reboot your machine right now, your iptables configuration would disappear. Rather than type this each time you reboot, however, you can save the configuration, and have it start up automatically. To save the configuration, you can use iptables-save and iptables-restore.

@terrancesnyder
Copy link
Author

allow localhost example

iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 7011
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 7011

@terrancesnyder
Copy link
Author

this successfully allows wget locally

iptables -t nat -I OUTPUT --source 0/0 --destination 0/0 -p tcp --dport 80 -j REDIRECT --to-ports 7011

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