Skip to content

Instantly share code, notes, and snippets.

@dRumata
Last active October 25, 2022 01:14
Show Gist options
  • Save dRumata/8633c56297867102bdcfdaebb0a80542 to your computer and use it in GitHub Desktop.
Save dRumata/8633c56297867102bdcfdaebb0a80542 to your computer and use it in GitHub Desktop.
How to make forwarding in Debian
#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment