A lightweight and fast UDP to TCP obfuscator idea from phantun.
- sudo sysctl -w net.inet.ip.forwarding=1
- To implement the equivalent of iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE for Network Address Translation (NAT) on macOS
- sudo nano /etc/pf.conf
- after the line rdr-anchor "com.apple/*". add line "nat on en0 from 192.168.1.0/24 to any -> (en0)"
- sudo pfctl -f /etc/pf.conf # Reload the PF configuration
- sudo pfctl -e # Enable PF (if not already enabled)
On Linux it is easy to config.
- enable traffic forward
- sudo sysctl -w net.inet.ip.forwarding=1
- Network Address Translation (NAT)
- iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE