Skip to content

Instantly share code, notes, and snippets.

@gdesatrigraha
Last active October 2, 2018 13:34
Show Gist options
  • Save gdesatrigraha/1ebd77d9fdd1b475c59158cf5a97eb41 to your computer and use it in GitHub Desktop.
Save gdesatrigraha/1ebd77d9fdd1b475c59158cf5a97eb41 to your computer and use it in GitHub Desktop.
iptables enable ip masquerading
#!/bin/sh
iptables -t nat -A POSTROUTING -o <eth0 or whatever else> -j MASQUERADE
# to persist the rule, install iptables-persistent package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment