Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
by Dataseal
Premessa
Utilizzata versione Ubuntu 10.xx e 11.xx. Pc portatile Asus, anno 2005, cpu centrino 1,8GHz, ram 1GB.
net.ipv4.conf.all.accept_redirects=0 # source-routed # I pacchetti source-routed sono utilizzati per specificare il percorso che bisogna fare per raggiungere #una certa destinazione. Un attaccante pu ingannare l'host inviandogli pacchetti su di un'interfaccia #fidata. net.ipv4.conf.all.accept_source_route=0 # reverse path-filter # vengono scartati tutti I pacchetti che giungono in ingresso su un'interfaccia diversa da quella che si #aspetterebbe il kernel consultando la tabella di routing; in pratica la risposta ad un pacchetto deve #giungere dalla medesima scheda da cui uscito. net.ipv4.conf.all.rp_filter=1 #configurazione dinamica #se non si vuole consentire l'uso di protocolli di configurazione dinamica, es BOOTP, DHCP, net.ipv4.ip_dynaddr=0 #forwarding #se un host stand-alone non dovrebbe servire poter gestire l'inoltro di pacchetti tra due host esterni. net.ipv4.ip_forward=0 #velocizzare la navigazione #Per impostazione predefinita vengono salvate le metriche ad ogni chiusura di ogni connessione, queste #possono essere utilizate per le successive connessioni ma implica un lavoro extra. net.ipv4.tcp_no_metrics_save = 1 #The default value of rmem_max (receive buffer size) and wmem_max (send buffer size) is about #128 KB in most Linux distributions, which may be enough for a low-latency general purpose network #environment or for apps such as DNS / Web server. However, if the latency is large, the default size #might be too small. Please note that the following settings going to increase memory usage on your #server. net.core.wmem_max=12582912 net.core.rmem_max=12582912
# #You also need to set minimum size, initial size, and maximum size in bytes:
net.ipv4.tcp_rmem= 10240 87380 12582912 net.ipv4.tcp_wmem= 10240 87380 12582912 # #Set maximum number of packets, queued on the INPUT side, when the #interface receives packets faster than kernel can process them.
net.core.netdev_max_backlog = 1000
net.ipv6.conf.lo.disable_ipv6 = 1
AUMENTARE LA SICUREZZA
Il file /etc/services converte il nome dei protocolli nel relativo numero di porta. # sudo chattr +i /etc/services Special Accounts # sudo cp /etc/passwd /etc/passwd.or # sudo cp /etc/group /etc/group.or # sudo userdel games # sudo groupdel games # sudo chattr +i /etc/passwd # sudo chattr +i /etc/group
OpenDNS
Da inserire nel router oppure niente gestione dns da router e nel file /etc/resolv.conf immetere solo le seguenti due righe: nameserver 208.67.220.220 nameserver 208.67.222.222 poi va reso immodificabile: # chattr +i /etc/resolv.conf