Skip to content

Instantly share code, notes, and snippets.

@bitcynth
Created September 12, 2018 06:10
Show Gist options
  • Save bitcynth/b9666d614e2461af1bbaa232e964ec50 to your computer and use it in GitHub Desktop.
Save bitcynth/b9666d614e2461af1bbaa232e964ec50 to your computer and use it in GitHub Desktop.
#!/bin/bash
ip link set enp1s0 up
iptables -t nat -A POSTROUTING -o enp0s25 -j MASQUERADE
iptables -A FORWARD -i enp0s25 # -o enp1s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp1s0 # -o enp0s25 -j ACCEPT
ip addr add 10.11.0.1/24 dev enp1s0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment