|
March 24, 2008
Filed Under (Linux Security) by admin on 24-03-2008
The purpose of syctl hardening is to help prevent spoofing and dos attacks. This short guide will show what I have found to be a good configuration for the sysctl.conf configuration file. The most important of the variables listed below is the enabling of syn cookie protection. Only place the bottom two if you do not want your server to respond to ICMP echo, commonly referred to as ICMP ping or just ping requests. Backup sysctl.conf : # mv /etc/sysctl.conf /etc/sysctl.conf.bak Open to edit the file: # nano -w /etc/sysctl.conf Now paste the following into the file, you can overwrite the current information. #Kernel sysctl configuration file for Red Hat Linux # Disables packet forwarding # Disables IP source routing # Enable IP spoofing protection, turn on source route verification # Disable ICMP Redirect Acceptance # Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets # Disables IP source routing # Enable IP spoofing protection, turn on source route verification # Disable ICMP Redirect Acceptance # Disables the magic-sysrq key # Decrease the time default value for tcp_fin_timeout connection # Decrease the time default value for tcp_keepalive_time connection # Turn off the tcp_window_scaling # Turn off the tcp_sack # Turn off the tcp_timestamps # Enable TCP SYN Cookie Protection # Enable ignoring broadcasts request # Enable bad error message Protection # Log Spoofed Packets, Source Routed Packets, Redirect Packets # Increases the size of the socket queue (effectively, q0). # Increase the tcp-time-wait buckets pool size # Allowed local port range After you make the changes to the file you need to run the commands below to enable the changes without a reboot: # /sbin/sysctl -p # sysctl -w net.ipv4.route.flush=1 Tags: hardening, syctlRelated postsYou must be logged in to post a comment. |
|