mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 06:09:25 +08:00
Compare commits
2
Commits
master
...
c239f35382
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c239f35382 | ||
|
|
49d57af719 |
@@ -46,7 +46,7 @@ vm.max_map_count = 262144
|
||||
# error:table full, dropping packet.
|
||||
net.nf_conntrack_max = 25000000
|
||||
net.netfilter.nf_conntrack_max = 25000000
|
||||
net.netfilter.ip_conntrack_tcp_timeout_established = 30
|
||||
# net.netfilter.ip_conntrack_tcp_timeout_established = 30
|
||||
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 10
|
||||
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 5
|
||||
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 5
|
||||
|
||||
@@ -502,7 +502,7 @@ class Firewall(object):
|
||||
rep = r"PasswordAuthentication\s+(\w*)\s*\n"
|
||||
conf = re.sub(rep, "PasswordAuthentication no\n", conf)
|
||||
mw.writeFile(file, conf)
|
||||
mw.execShell("systemctl restart sshd")
|
||||
mw.execShell("which systemctl && systemctl restart sshd")
|
||||
mw.writeLog("SSH管理", msg)
|
||||
return mw.returnData(True, msg)
|
||||
|
||||
@@ -530,7 +530,7 @@ class Firewall(object):
|
||||
rep = r"PubkeyAuthentication\s+(\w*)\s*\n"
|
||||
content = re.sub(rep, "PubkeyAuthentication no\n", content)
|
||||
mw.writeFile(file, content)
|
||||
mw.execShell("systemctl restart sshd")
|
||||
mw.execShell("which systemctl && systemctl restart sshd")
|
||||
mw.writeLog("SSH管理", msg)
|
||||
return mw.returnData(True, msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user