1
0
Fork 0
mirror of synced 2024-06-16 22:31:09 -04:00
ovpn-admin/stop.d/secondary_ip_route.sh

6 lines
212 B
Bash
Raw Normal View History

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 13:29:54 -05:00
iptables -t nat -D POSTROUTING -s "$OVPN_NET_SUBNET" -o "$default_iface" -j SNAT --to-source "$OVPN_PUBLIC_IP"