[FoLUG] ssh
Francesco
sizukesa77@tiscali.it
Sab 19 Feb 2005 11:26:08 CET
On Sat, 2005-02-19 at 02:03 +0100, IvanoeZ wrote:
> ti consigliere prima di tutto disattivare iptables, in questo modo elimini il
> problema firewall. (che potrebbe essere quello se le regole nn sono scritte
> bene)
> quindi metti tutte le policy in ACCEPT.
Ho provato cambiando la policy di default per l'input da drop a accept,
e pensavo che questo bastasse per togliere una eventuale regola mal
fatta (tutte le regole erano di accept).
> Se lavori da remoto, ti consiglio di mettere in cron una regola che ti apra il
> firewall dopo 10 minuti, in questo modo se sbagli qualcosa, puoi provare a
> rifarla fra 10 minuti.
Si questo e' utile.
In ogni caso questo e' il corpo del reato:
root@alita:/etc/init.d#iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- localhost localhost
DROP all -- 192.168.0.0/24 anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- 192.168.0.0/24 anywhere state NEW
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
DROP icmp -- anywhere anywhere icmp
echo-request length 128:65535
ACCEPT icmp -- 192.168.0.0/24 anywhere
ACCEPT tcp -- anywhere anywhere tcp
dpts:4661:4672 state NEW,RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp
dpt:4711 state NEW,RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp
dpts:6881:6889
Chain FORWARD (policy DROP)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp
flags:SYN,RST/SYN TCPMSS clamp to PMTU
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state
NEW,RELATED,ESTABLISHED
DROP icmp -- anywhere anywhere icmp
echo-request length 128:65535
DROP all -- anywhere anywhere PKTTYPE =
multicast
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state
NEW,RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp
spts:4661:4672 state NEW,RELATED,ESTABLISHED
--
Francesco
Powered By Gentoo GNU/Linux x86_64
http://xoomer.virgilio.it/frpiano
Maggiori informazioni sulla lista
FoLUG