Commit 0d2a306a authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 02c6e986
...@@ -75,14 +75,13 @@ async function doIptable(whiteIp) { ...@@ -75,14 +75,13 @@ async function doIptable(whiteIp) {
for (let i = 0; i < whiteIp.length; i++) { for (let i = 0; i < whiteIp.length; i++) {
command += 'iptables -A INPUT -p tcp -s ' + whiteIp[i] + ' --dport 3000 -j ACCEPT' command += 'iptables -A INPUT -p tcp -s ' + whiteIp[i] + ' --dport 3000 -j ACCEPT'
command += '\n' command += '\n'
command += 'iptables -A INPUT -p tcp -s ' + whiteIp[i] + ' --dport 22 -j ACCEPT'
command += '\n'
} }
command += 'iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 3000 -j DROP' command += 'iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 3000 -j DROP'
command += '\n' command += '\n'
command += 'iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 22 -j DROP'
await createfile(command) await createfile(command)
await execLast() await execLast()
return true return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment