2024-01-01 12:14:00 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
|
2024-01-01 13:33:03 -05:00
|
|
|
default_iface=$(ip route | grep default | head -n 1 | awk '{print $5}')
|
2024-01-01 12:14:00 -05:00
|
|
|
iptables -t nat -I POSTROUTING -s "$OVPN_NET_SUBNET" -o "$default_iface" -j SNAT --to-source "$OVPN_PUBLIC_IP"
|