mirror of
https://github.com/flant/ovpn-admin.git
synced 2026-02-04 09:12:13 -08:00
6 lines
200 B
Bash
6 lines
200 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -ex
|
||
|
|
|
||
|
|
default_iface=$(ip route | grep default | awk '{print $5}')
|
||
|
|
iptables -t nat -I POSTROUTING -s "$OVPN_NET_SUBNET" -o "$default_iface" -j SNAT --to-source "$OVPN_PUBLIC_IP"
|