Skip to content

Commit 52a91d2

Browse files
committed
ovpn_run: Silence iptables rule checks
* It's fine for these to fail, it's expected.
1 parent 9eae930 commit 52a91d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/ovpn_run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ function addArg {
3939
# this allows rules/routing to be altered by supplying this function
4040
# in an included file, such as ovpn_env.sh
4141
function setupIptablesAndRouting {
42-
iptables -t nat -C POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE || {
42+
iptables -t nat -C POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE 2>/dev/null || {
4343
iptables -t nat -A POSTROUTING -s $OVPN_SERVER -o $OVPN_NATDEVICE -j MASQUERADE
4444
}
4545
for i in "${OVPN_ROUTES[@]}"; do
46-
iptables -t nat -C POSTROUTING -s "$i" -o $OVPN_NATDEVICE -j MASQUERADE || {
46+
iptables -t nat -C POSTROUTING -s "$i" -o $OVPN_NATDEVICE -j MASQUERADE 2>/dev/null || {
4747
iptables -t nat -A POSTROUTING -s "$i" -o $OVPN_NATDEVICE -j MASQUERADE
4848
}
4949
done

0 commit comments

Comments
 (0)