Skip to content

Commit e8b568a

Browse files
author
r0p0s3c
committed
add additional documentation clarifying calling of function, purpose, and how to override it
1 parent a2adb59 commit e8b568a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/ovpn_run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ function addArg {
3535
fi
3636
}
3737

38+
# set up iptables rules and routing
39+
# this allows rules/routing to be altered by supplying this function
40+
# in an included file, such as ovpn_env.sh
3841
function setupIptablesAndRouting {
3942
iptables -t nat -C POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE || {
4043
iptables -t nat -A POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE
@@ -65,6 +68,9 @@ fi
6568

6669
# Setup NAT forwarding if requested
6770
if [ "$OVPN_DEFROUTE" != "0" ] || [ "$OVPN_NAT" == "1" ] ; then
71+
# call function to setup iptables rules and routing
72+
# this allows rules to be customized by supplying
73+
# a replacement function in, for example, ovpn_env.sh
6874
setupIptablesAndRouting
6975
fi
7076

0 commit comments

Comments
 (0)