Minor changes (loader link + iptables rule)

This commit is contained in:
Félix Aime
2021-03-10 18:07:33 +01:00
parent 885d67afd0
commit 0d32a1d3c4
2 changed files with 4 additions and 3 deletions

View File

@ -295,9 +295,10 @@ class Network(object):
sp.Popen(["iptables", "-A", "POSTROUTING", "-t", "nat", "-o",
self.iface_out, "-j", "MASQUERADE"]).wait()
# Prevent the device to reach the 80 of TinyCheck.
# Prevent the device to reach the 80 and 443 of TinyCheck.
sp.Popen(["iptables", "-A", "INPUT", "-i", self.iface_in, "-d",
"192.168.100.1", "-p", "tcp", "--dport", "80", "-j" "DROP"]).wait()
"192.168.100.1", "-p", "tcp", "--match", "multiport", "--dports", "80,443", "-j" "DROP"]).wait()
return True
except:
return False