Un saluto a tutti,
volevo condividere con voi le regole del Network Monitor che ho sperimentato in questi giorni e che, credo, mi abbiano garantito una buona protezione.
Era un po’ che non mi divertivo piu’ nella strutturazione di regole (e magari la ruggine si vede ancora).
Spero possiamo commentarle insieme e se possibile migliorarle.
Premesso che ho l’ultima definita di CPF (2.3.6.81), IE 7, emule e Outlook Express come softwares che girano verso l’esterno.
Inoltre un IP statico ed un routerino.
Alcune regole sono ridondanti (quelle di BLOCK) semplicemente per loggare quanto piu’ e’ interessante a mio parere.
Cominciamo… :
- Allow IP IN or OUT From IP “zone” to IP “zone” where IPPROTO is ANY
commento: mi sembrava opportuno ed affato rischioso permettere la comunicazione tra IP fisso (scheda di rete) e router, tutto qui.
-
Block & Log TCP or UDP In or OUT from IP any to IP any where source port is Any and destination port is In 22,23,135,136,137,138,139,445,500,512,513,514,593,1775,2029,4045
-
Block & Log TCP or UDP In or OUT from IP any to IP any where source port is in 22,23,135,136,137,138,139,445,500,512,513,514,593,1775,2029,4045 and destination port is Any
commento: queste due regole bloccano il traffico UDP e TCP verso le porte piu’ comunemente usate per gli attacchi. Parte di queste regole (ad esclusione delle porte 1775,2029 e 4045) sono ripeture (per cui qui inutili) anche nelle regole 4 6 7 10 e 11. Ho voluto mettere queste porte in questa regola e in questa posizione per meglio verificare da log i presunti attacchi.
- Allow TCP IN from IP any to IP “mio IP statico della sk di rete” where source port is ANY and destination port is “la vostra porta tcp del P2P o il vostro range TCP del P2P”
commento: questa e’ una delle regole (almeno 2) fondamentali per l’uso del P2P
- BLOCK & LOG TCP IN from IP ANY to IP ANY where source port is ANY and destination port is ANY
commento: il traffico TCP in entrata non serve a chi non ha connessioni tipo server. E’ sempre preferibile bloccarlo ad esclusione delle porte per il P2P.
- ALLOW TCP OUT from IP “mio IP statico della sk di rete” where source port is ANY and destination port is IN 21,25,80,143,443,995,
commento: le porte da aprire per poter navigare, scaricare files in FTP e usare outlook express (la 995 e’ di Gmail). Probabilmente qui manchera’ qualche porta che ancora devo verificare o quelle utili ai vostri programmi che ne usano di particolari.
-
BLOCK & LOG TCP OUT from IP any to IP any where source port is any and destination port is (range) 0 - 1024
-
BLOCK & LOG TCP OUT from IP any to IP any where source port is (range) 0 - 1024 and destination port is any
commento: queste regole garantiscono un buon muro contro gli attacchi verso le porte “basse” quelle piu’ comunemente usate per gli attacchi e le intrusioni. Parte di queste porte erano gia’ state bloccate dalle regole 1 e 2.
8 ) Allow UDP IN from IP any to IP “mio IP statico della sk di rete” where source port is ANY and destination port is “la vostra porta tcp del P2P o il vostro range TCP del P2P”
commento: vale il discorso della regola 3
- ALLOW UDP OUT from IP “mio IP statico della sk di rete” to IP any where source port is ANY and destination port is IN 53,123
commento: come nelle regole di “apertura porte” e’ possibile ne manchi qualcuna. Le 2 porte che ho aperto qui sono quella per il DNS (altrimenti non si naviga) e quella per la sincronizzazione dell’ora internet con i vari servers atomici.
-
BLOCK & LOG UDP IN or OUT from IP any to IP any where source port is any and destination port is (range) 0 - 1024
-
BLOCK & LOG UDP IN or OUT from IP any to IP any where source port is (range) 0 - 1024 and destination port is any
commento: vale lo stesso discorso delle regole 6 e 7.
- ALLOW TCP or UDP IN or OUT from IP any to IP any where source port is any and destination port is any
commento: dopo tanto bloccare e’ arrivato il momento di permettere… altrimenti anche i softwares di P2P (che non usano solo le porte da voi settate) non lavorerebbero come si deve… (in particolare emule).
-
ALLOW ICMP OUT from IP “mio IP statico della sk di rete” to IP any WHERE ICMP MESSAGE IS ECHO REQUEST
-
ALLOW ICMP IN or OUT from IP ANY to IP any WHERE ICMP MESSAGE IS FRAGMENTATION NEEDED
commento: cominciamo ad aprire qualcosa dell’ICMP, questo e’ quanto e’ considerato “SAFE”.
- BLOCK ICMP IN or OUT from IP any to IP any where ICMP message is ANY.
commento: chiudiamo il resto dell’ICMP!
- BLOCK IP IN or OUT from IP any to IP any where IPPROTO is IGMP
commento: questa regola puo’ in effetti essere inutile considerato che la 17 la comprende. L’ho essa senza il LOG per evitare che la 17 mi riempia di messaggi il LOG appunto. L’IGMP non serve praticamente a nessuno.
- BLOCK IP IN or OUT from IP any to IP any where IPPROTO is ANY
commento: con questa regola blocchiamo TUTTO il resto del traffico, del tutto inutile dopo che abbiamo aperto quello che ci serviva. Questa regola deve sempre esistere e sempre per ultima.
Spero possiate aiutarmi a migliorarle e magari spero di aiutare voi a mettere qualche tappetto senza inficiare l’uso della rete!
Ciao!!
(:WAV)