Linux Security (sysctl.conf)

nano /etc/sysctl.conf

(Ezek a beállítások javítják a hálózat biztonságát és megakadályoznak többféle hálózati támadást. De egyes hálózati környezetek megkövetelik, hogy ezeket a beállítások le legyenek tiltva, ezért nézze át és szükség szerint engedélyezze őket.)

Spoof protection (reverse-path filter)

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

 

Enable TCP SYN Cookie Protection

net.ipv4.tcp_syncookies=1

Do not accept ICMP redirects (prevent MITM attacks)

net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0

 

We are not a router

# Do not send ICMP redirects
net.ipv4.conf.all.send_redirects = 0

# Do not accept IP source route packets
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0

# Log Martian Packets
net.ipv4.conf.all.log_martians = 1

 

archlinux ajánlása

# nano /etc/sysctl.d/99-sysctl.conf

# Increasing the size of the receive queue.
# net.core.netdev_max_backlog = 16384
# Increase the maximum connections
# net.core.somaxconn = 8192
#Spoof protection (reverse-path filter)
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1
#Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies=1
# TCP rfc1337
net.ipv4.tcp_rfc1337 = 1
# Do not accept ICMP redirects (prevent MITM attacks)
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
# Do not send ICMP redirects
net.ipv4.conf.all.send_redirects = 0
# Do not accept IP source route packets
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
# Log Martian Packets
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
#Disable ICMP redirects arch wiki
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
#To disable ICMP redirect sending when on a non router: arch wiki
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0

A módosítások érvénybe léptetéséhez adja ki a következő parancsot:

# sysctl –system

 

Hogyan láthatom a naplózott gyanús marsi csomagok naplóit Linuxon?

# cd /var/log
# grep -i --color martian messages*

©2016 idStudio & SMThemes.com

Legjobb tárhely ajánlatok


ADATKEZELÉSI TÁJÉKOZTATÓ