nmap -p 22 2.27.42.100
nmap -p 22 2.27.42.100
nmap -p 22 2.27.42.100
PORT STATE SERVICE
22/tcp filtered ssh
PORT STATE SERVICE
22/tcp filtered ssh
PORT STATE SERVICE
22/tcp filtered ssh
Chain INPUT (policy DROP)
1 KUBE-ROUTER-INPUT
2 ACCEPT tcp dpt:22
3 KUBE-PROXY-FIREWALL
...
8 ufw-before-input
Chain INPUT (policy DROP)
1 KUBE-ROUTER-INPUT
2 ACCEPT tcp dpt:22
3 KUBE-PROXY-FIREWALL
...
8 ufw-before-input
Chain INPUT (policy DROP)
1 KUBE-ROUTER-INPUT
2 ACCEPT tcp dpt:22
3 KUBE-PROXY-FIREWALL
...
8 ufw-before-input
nft list ruleset | grep -E "22|drop|DROP"
nft list ruleset | grep -E "22|drop|DROP"
nft list ruleset | grep -E "22|drop|DROP"
type filter hook input priority filter; policy drop;
...
tcp dport 22 counter packets 0 bytes 0 accept
type filter hook input priority filter; policy drop;
...
tcp dport 22 counter packets 0 bytes 0 accept
type filter hook input priority filter; policy drop;
...
tcp dport 22 counter packets 0 bytes 0 accept
# Warning: table ip filter is managed by iptables-nft, do not touch!
# Warning: table ip filter is managed by iptables-nft, do not touch!
# Warning: table ip filter is managed by iptables-nft, do not touch!
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
systemctl start nftables
/etc/nftables.conf
fail2ban-client unban --all
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
nft add table inet ssh_rescue
nft 'add chain inet ssh_rescue input { type filter hook input priority -150; }'
nft add rule inet ssh_rescue input tcp dport 22 accept
cat > /usr/local/bin/ssh-rescue.sh << 'EOF2'
#!/bin/bash
nft list table inet ssh_rescue 2>/dev/null || { nft add table inet ssh_rescue nft add chain inet ssh_rescue input { type filter hook input priority -150; } nft add rule inet ssh_rescue input tcp dport 22 accept
}
EOF2
chmod +x /usr/local/bin/ssh-rescue.sh
cat > /usr/local/bin/ssh-rescue.sh << 'EOF2'
#!/bin/bash
nft list table inet ssh_rescue 2>/dev/null || { nft add table inet ssh_rescue nft add chain inet ssh_rescue input { type filter hook input priority -150; } nft add rule inet ssh_rescue input tcp dport 22 accept
}
EOF2
chmod +x /usr/local/bin/ssh-rescue.sh
cat > /usr/local/bin/ssh-rescue.sh << 'EOF2'
#!/bin/bash
nft list table inet ssh_rescue 2>/dev/null || { nft add table inet ssh_rescue nft add chain inet ssh_rescue input { type filter hook input priority -150; } nft add rule inet ssh_rescue input tcp dport 22 accept
}
EOF2
chmod +x /usr/local/bin/ssh-rescue.sh
nmap -p 22 <ip>