Skip to content

Instantly share code, notes, and snippets.

@tetranz

tetranz/usb0 Secret

Last active June 11, 2021 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tetranz/dd86e323d32e65070a4c0e954d2d1aaa to your computer and use it in GitHub Desktop.
Save tetranz/dd86e323d32e65070a4c0e954d2d1aaa to your computer and use it in GitHub Desktop.
usb0
allow-hotplug usb0
iface usb0 inet dhcp
# Adjust TTL as required.
post-up iptables -t mangle -A POSTROUTING -o usb0 -j TTL --ttl-set 65
# Uncomment as described below to use WireGuard or not but not both.
# Uncomment these lines to use WireGuard.
post-up systemctl restart wg-quick@wg0
post-down systemctl stop wg-quick@wg0
# Uncomment these lines to use the device directly without WireGuard.
# post-up iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
# post-down iptables -t nat -D POSTROUTING -o usb0 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment