mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Use default VPN instead of GRE tunnel for now
This commit is contained in:
parent
64e055e218
commit
f52acee888
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue