mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-02-12 18:41:52 +00:00
Fix redirect ip for multi ips
This commit is contained in:
parent
a3ffef1222
commit
64e055e218
1 changed files with 1 additions and 1 deletions
|
@ -630,7 +630,7 @@ 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 + ' # 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")
|
||||
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…
Reference in a new issue