Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gavin Pryke
linuxmce
Commits
c70a6c04
Commit
c70a6c04
authored
Apr 01, 2017
by
Alblasco1702
Browse files
Update lmce-vpn-up
parent
14f75b06
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/BootScripts/ppp/ip-up.d/lmce-vpn-up
View file @
c70a6c04
...
...
@@ -4,11 +4,15 @@ if [[ "$6" != "" ]]; then
if
[[
"
$VPNenabled
"
==
"on"
]]
;
then
.
/usr/pluto/bin/Config_Ops.sh
if
[[
"
$DisableIPv4Firewall
"
!=
"1"
]]
;
then
R
=
$(
mysql pluto_main
-ss
-e
"SELECT Protocol FROM Firewall WHERE RuleType='VPN' AND SourceIP='
$5
' AND Protocol='ip-ipv4' ORDER BY PK_Firewall"
)
R
=
$(
mysql pluto_main
-ss
-e
"SELECT
Place,
Protocol FROM Firewall WHERE RuleType='VPN' AND SourceIP='
$5
' AND Protocol='ip-ipv4' ORDER BY PK_Firewall"
)
if
[[
"
$R
"
]]
;
then
mysql pluto_main
-ss
-e
"UPDATE Firewall SET Offline=0 WHERE RuleType='VPN' AND SourceIP='
$5
'"
for
Port
in
$R
;
do
Place
=
$(
Field 1
"
$Port
"
)
Protocol
=
$(
Field 2
"
$Port
"
)
mysql pluto_main
-ss
-e
"UPDATE Firewall SET Offline=0 WHERE RuleType='VPN' AND SourceIP='
$5
'"
/usr/pluto/bin/Network_Firewall.sh
-L
Rule
-A
Online
-P
$Protocol
-p
$Place
done
fi
/usr/pluto/bin/Network_Firewall.sh
fi
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment