From f52acee888a39cc812ba6848aec5eeb1a82ab7ba Mon Sep 17 00:00:00 2001 From: Ycarus Date: Tue, 29 Dec 2020 20:13:29 +0100 Subject: [PATCH] Use default VPN instead of GRE tunnel for now --- omr-admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omr-admin.py b/omr-admin.py index 26a4df4..3e9b224 100755 --- a/omr-admin.py +++ b/omr-admin.py @@ -630,7 +630,8 @@ def shorewall_add_port(user, port, proto, name, fwtype='ACCEPT', source_dip='', if fwtype == 'ACCEPT': n.write('ACCEPT ' + net + ' $FW ' + proto + ' ' + port + ' - ' + source_dip + ' # OMR ' + user.username + ' open ' + name + ' port ' + proto + comment + "\n") elif fwtype == 'DNAT' and vpn != 'default': - n.write('DNAT ' + net + ' vpn:' + vpn + ' ' + proto + ' ' + port + ' - ' + source_dip + ' # OMR ' + user.username + ' redirect ' + name + ' port ' + proto + comment + "\n") + #n.write('DNAT ' + net + ' vpn:' + vpn + ' ' + proto + ' ' + port + ' - ' + source_dip + ' # OMR ' + user.username + ' redirect ' + name + ' port ' + proto + comment + "\n") + n.write('DNAT ' + net + ' vpn:$OMR_ADDR' + ' ' + proto + ' ' + port + ' - ' + source_dip + ' # OMR ' + user.username + ' redirect ' + name + ' port ' + proto + comment + "\n") elif fwtype == 'DNAT' and userid == 0: n.write('DNAT ' + net + ' vpn:$OMR_ADDR ' + proto + ' ' + port + ' - ' + source_dip + ' # OMR ' + user.username + ' redirect ' + name + ' port ' + proto + comment + "\n") elif fwtype == 'DNAT' and userid != 0: