File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ function addArg {
35
35
fi
36
36
}
37
37
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
38
41
function setupIptablesAndRouting {
39
42
iptables -t nat -C POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE || {
40
43
iptables -t nat -A POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE
65
68
66
69
# Setup NAT forwarding if requested
67
70
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
68
74
setupIptablesAndRouting
69
75
fi
70
76
You can’t perform that action at this time.
0 commit comments