HELP Cant connect to server via SSH or SFTP
ACCEPT udp – anywhere anywhere udp dpt:20 state NEW,ESTABLISHED
ACCEPT udp -- anywhere anywhere udp dpt:fsp state NEW,ESTABLISHED
ACCEPT udp -- anywhere anywhere udp dpt:domain state NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:https state NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:www state NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssmtp state NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp state NEW,ESTABLISHED
DROP icmp -- anywhere anywhere limit: avg 15/sec burst 5
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy DROP)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp spt:20 state ESTABLISHED
ACCEPT udp -- anywhere anywhere udp spt:fsp state ESTABLISHED
ACCEPT udp -- anywhere anywhere udp spt:domain state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:ssh state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:https state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:www state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:ssmtp state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:smtp state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp multiport sports tcpmux:63665 state
NEW,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp any
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
root@www:~#
All was working up till this morning and we have not made any changes.
Thanks
4 Replies
Your output chain appears pointless, since the policy is to accept by default, and then you have nothing but accept rules.
However, the Linode Library has a wealth of material on all sorts of topics, including iptables:
They also have some more general security info: