siotp/sio1/ferm/tppf/fw3.sh.save.1
raphanaud 4de0324acf ferm
2021-05-28 10:46:21 +02:00

23 lines
665 B
Groff
Executable File

iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
#!/bin/bash
sysctl -w net.ipv4.ip_forward=1
iptables -F -t filter
iptables -F nat
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 53,80,21 -j ACCEPT
iptables -A OUTPUT -p tcp -m multiport --sports 53,80,21 -j ACCEPT