Enable SSH with password, iptables for sputnik

This commit is contained in:
Daniel A. Maierhofer
2018-11-04 21:01:49 +01:00
parent 16ae555450
commit 4b48b83ce9
3 changed files with 33 additions and 0 deletions

7
host_vars/sputnik Normal file
View File

@@ -0,0 +1,7 @@
inventory_hostname: sputnik.fet.htu.tuwien.ac.at
inventory_hostname_short: sputnik
common_iptables_v4: "iptables_sputnik_v4.j2"
common_iptables_v6: "iptables_sputnik_v6.j2"
common_openssh_password_authentication: "yes"

View File

@@ -0,0 +1,14 @@
# {{ ansible_managed }}
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -j REJECT --reject-with icmp-proto-unreachable
COMMIT

View File

@@ -0,0 +1,12 @@
# {{ ansible_managed }}
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp --syn -j DROP
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
-A INPUT -i lo -j ACCEPT
COMMIT