Mam podobnie, co prawda sprawa dotyczny arch linux, ale to powinno wyglądać podobnie.
Stworzyłem sobie skrypt firewalla, który startuje sobie z rc.local. Skrypt działa chyba poprawnie.
Kod: Zaznacz cały
$iptables -L
Chain INPUT (policy DROP)
target prot opt source dest
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
Chain OUTPUT (policy ACCEPT)
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
forward pusto, policy DROP
natomiast nmap localhost mowi ze wszystkie porty zamkniete, a proba polaczenia sie z innego komputere (w sieci lokalnej, mojej wlasnej przez router linksysa)
Kod: Zaznacz cały
$ ssh 192.168.1.1
ssh: connect to host 192.168.1.1 port 22: Connection refused
w /etc/hosts.deny nie mam nic, a w hosts.allow mam ALL:ALL:ALLOW i nic wiecej.
EDIT:
PS @aljandor w tym co znalazles w necie po "-d" nie masz argumentu tylko od razu --dport