<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.saruman.biz/saruwiki/index.php?action=history&amp;feed=atom&amp;title=Procsys_recommendations</id>
	<title>Procsys recommendations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.saruman.biz/saruwiki/index.php?action=history&amp;feed=atom&amp;title=Procsys_recommendations"/>
	<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;action=history"/>
	<updated>2026-05-02T17:42:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1515&amp;oldid=prev</id>
		<title>Saruman!: typo with log_martians key</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1515&amp;oldid=prev"/>
		<updated>2008-06-08T14:02:41Z</updated>

		<summary type="html">&lt;p&gt;typo with log_martians key&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:02, 8 June 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_source_route = 0&amp;lt;br&amp;gt;Source Routed packets can ask for a specific route; however they can be misused to route packets around firewalled interfaces. To our knowledge, no sane network configuration requires Source Routing these days, so we (explicitly) disable it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_source_route = 0&amp;lt;br&amp;gt;Source Routed packets can ask for a specific route; however they can be misused to route packets around firewalled interfaces. To our knowledge, no sane network configuration requires Source Routing these days, so we (explicitly) disable it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.tcp_syncookies = 0&amp;lt;br&amp;gt;By default SYNcookies are off, and we don&amp;#039;t enable them either, but if you believe you&amp;#039;re under a SYN attack, you might want to enable this setting (either for one time only, or permanently). Setting TCP SYN cookies enables SYN flood protection, but causes some problems as well, including masking legitimate overloading. WARNING - only enable SYN cookies if you really understand what it does!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.tcp_syncookies = 0&amp;lt;br&amp;gt;By default SYNcookies are off, and we don&amp;#039;t enable them either, but if you believe you&amp;#039;re under a SYN attack, you might want to enable this setting (either for one time only, or permanently). Setting TCP SYN cookies enables SYN flood protection, but causes some problems as well, including masking legitimate overloading. WARNING - only enable SYN cookies if you really understand what it does!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/del&gt;all&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/del&gt;log_martians = 0&amp;lt;br&amp;gt;Setting log_martians &quot;on&quot; means the kernel will log to the kernel log all packets (including their source addresses) that have no known route. If it is set off, those &quot;martians&quot; are dropped silently. We usually don&#039;t need logging on Martians, but you might want to enable it for diagnostic purposes.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;all&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;log_martians = 0&amp;lt;br&amp;gt;Setting log_martians &quot;on&quot; means the kernel will log to the kernel log all packets (including their source addresses) that have no known route. If it is set off, those &quot;martians&quot; are dropped silently. We usually don&#039;t need logging on Martians, but you might want to enable it for diagnostic purposes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that we DON&amp;#039;T use &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039; to enable forwarding on our multi-homed servers; it is too easy to make a mistake, and have a system with forwarding enabled and the firewall disabled. Therefor, we program our firewall to directly manipulate the forwarding property, and then only after the firewall is fully initilised.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that we DON&amp;#039;T use &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039; to enable forwarding on our multi-homed servers; it is too easy to make a mistake, and have a system with forwarding enabled and the firewall disabled. Therefor, we program our firewall to directly manipulate the forwarding property, and then only after the firewall is fully initilised.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Saruman!</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1514&amp;oldid=prev</id>
		<title>Saruman! at 13:56, 8 June 2008</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1514&amp;oldid=prev"/>
		<updated>2008-06-08T13:56:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:56, 8 June 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_echo_ignore_broadcasts = 1&amp;lt;br&amp;gt;This setting makes sure our server will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; respond to echo requests to a broadcast address. This is because when the source address of the echo request is forged, your server will be replying with echo replies to an innocent machine, that might well be flooded with echo replies it didn&amp;#039;t request (this is a classic network dDOS attack).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_echo_ignore_broadcasts = 1&amp;lt;br&amp;gt;This setting makes sure our server will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; respond to echo requests to a broadcast address. This is because when the source address of the echo request is forged, your server will be replying with echo replies to an innocent machine, that might well be flooded with echo replies it didn&amp;#039;t request (this is a classic network dDOS attack).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_echo_ignore_all = 0&amp;lt;br&amp;gt;It is possible to make your server more &amp;quot;stealthily&amp;quot; by not having it respond to echo requests. However, since &amp;#039;&amp;#039;ping&amp;#039;&amp;#039; is one of our favourite diagnostic tools, we do not want to disable echo replies on our machines (you might, ofcourse).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_echo_ignore_all = 0&amp;lt;br&amp;gt;It is possible to make your server more &amp;quot;stealthily&amp;quot; by not having it respond to echo requests. However, since &amp;#039;&amp;#039;ping&amp;#039;&amp;#039; is one of our favourite diagnostic tools, we do not want to disable echo replies on our machines (you might, ofcourse).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_ignore_bogus_error_responses = 1&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.icmp_ignore_bogus_error_responses = 1&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sometimes you will come across routers that send out invalid responses to broadcast frames. This is a violation of RFC 1122, Requirements for Internet Hosts -- Communication Layers&quot;. As a result, these events are logged by the kernel. To avoid filling up your logfile with unnecessary clutter, you can tell the kernel not to issue these warnings.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_redirects = 0&amp;lt;br&amp;gt;An ICMP redirect is an error message sent by a router to the sender of an IP packet. Redirects are used when a router believes a packet is being routed sub-optimally and it would like to inform the sending host that it should forward subsequent packets to that same destination through a different gateway. However, no network should &amp;#039;&amp;#039;need&amp;#039;&amp;#039; ICMP redirect; though ICMP redirects serve to point out issues with sub optimal routing, network re-architecting should be favored over their use. Well designed networks should never lend themselves to the reliance on or desire for ICMP redirects for reasons of performance, consistency, reliability, and security. Therefore, we see no need to enable this setting on our routers/gateway servers.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_redirects = 0&amp;lt;br&amp;gt;An ICMP redirect is an error message sent by a router to the sender of an IP packet. Redirects are used when a router believes a packet is being routed sub-optimally and it would like to inform the sending host that it should forward subsequent packets to that same destination through a different gateway. However, no network should &amp;#039;&amp;#039;need&amp;#039;&amp;#039; ICMP redirect; though ICMP redirects serve to point out issues with sub optimal routing, network re-architecting should be favored over their use. Well designed networks should never lend themselves to the reliance on or desire for ICMP redirects for reasons of performance, consistency, reliability, and security. Therefore, we see no need to enable this setting on our routers/gateway servers.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.rp_filter = 1&amp;lt;br&amp;gt;Enabling rp_filter means Reverse Path filtering; it enables the kernel to do Source Address Verification; this prevents spoofing attacks against our internal networks. If a network packet is incoming on an external interface with an internal source- and destination IP address (probably forged by an attacker), then the kernel will &#039;&#039;not&#039;&#039; allow the packet, based on it having invalid source address. This should never harm legitimate network traffic, but will stop certain network attacks.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.rp_filter = 1&amp;lt;br&amp;gt;Enabling rp_filter means Reverse Path filtering; it enables the kernel to do Source Address Verification; this prevents spoofing attacks against our internal networks. If a network packet is incoming on an external interface with an internal source- and destination IP address (probably forged by an attacker), then the kernel will &#039;&#039;not&#039;&#039; allow the packet, based on it having invalid source address. This should never harm legitimate network traffic, but will stop certain network attacks. (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note: &lt;/ins&gt;external addresses  can  still  be  spoofed)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/del&gt;(external addresses  can  still  be  spoofed)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_source_route = 0&amp;lt;br&amp;gt;Source Routed packets can ask for a specific route; however they can be misused to route packets around firewalled interfaces. To our knowledge, no sane network configuration requires Source Routing these days, so we (explicitly) disable it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.conf.all.accept_source_route = 0&amp;lt;br&amp;gt;Source Routed packets can ask for a specific route; however they can be misused to route packets around firewalled interfaces. To our knowledge, no sane network configuration requires Source Routing these days, so we (explicitly) disable it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.tcp_syncookies = 0&amp;lt;br&amp;gt;By default SYNcookies are off, and we don&amp;#039;t enable them either, but if you believe you&amp;#039;re under a SYN attack, you might want to enable this setting (either for one time only, or permanently). Setting TCP SYN cookies enables SYN flood protection, but causes some problems as well, including masking legitimate overloading. WARNING - only enable SYN cookies if you really understand what it does!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* net.ipv4.tcp_syncookies = 0&amp;lt;br&amp;gt;By default SYNcookies are off, and we don&amp;#039;t enable them either, but if you believe you&amp;#039;re under a SYN attack, you might want to enable this setting (either for one time only, or permanently). Setting TCP SYN cookies enables SYN flood protection, but causes some problems as well, including masking legitimate overloading. WARNING - only enable SYN cookies if you really understand what it does!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Saruman!</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1513&amp;oldid=prev</id>
		<title>Saruman!: Explained our standard sysctl.conf settings</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Procsys_recommendations&amp;diff=1513&amp;oldid=prev"/>
		<updated>2008-06-08T13:47:21Z</updated>

		<summary type="html">&lt;p&gt;Explained our standard sysctl.conf settings&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==/proc/sys settings recommendations==&lt;br /&gt;
&lt;br /&gt;
As could be seen from [[System boot procedure]] section, your Debian system can automatically have its kernel configured on boot, using the &amp;#039;&amp;#039;sysctl&amp;#039;&amp;#039; utility; all you have to do for that is to edit ../etc/sysctl.conf&amp;#039;&amp;#039;. The file will usually be there already, but every line is commented out. Read the manuals (&amp;#039;&amp;#039;man sysctl&amp;#039;&amp;#039; and &amp;#039;&amp;#039;man sysctl.conf&amp;#039;&amp;#039;) to see how they work; we&amp;#039;re not going to explain that here.&lt;br /&gt;
&lt;br /&gt;
What we&amp;#039;re going to look at, is what settings we would want to make in &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039;, and more importantly, why. For this, we&amp;#039;re going to discuss our own &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039; line by line.&lt;br /&gt;
&lt;br /&gt;
===IPV4 Network settings===&lt;br /&gt;
The &amp;#039;&amp;#039;/proc/sys&amp;#039;&amp;#039; virtual filesystem is a powerful way to manipulate the way your kernel handles network packages coming in (and going out) of your machine. For security purposes, we make the following settings - already in &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039; notation:&lt;br /&gt;
* net.ipv4.icmp_echo_ignore_broadcasts = 1&amp;lt;br&amp;gt;This setting makes sure our server will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; respond to echo requests to a broadcast address. This is because when the source address of the echo request is forged, your server will be replying with echo replies to an innocent machine, that might well be flooded with echo replies it didn&amp;#039;t request (this is a classic network dDOS attack).&lt;br /&gt;
* net.ipv4.icmp_echo_ignore_all = 0&amp;lt;br&amp;gt;It is possible to make your server more &amp;quot;stealthily&amp;quot; by not having it respond to echo requests. However, since &amp;#039;&amp;#039;ping&amp;#039;&amp;#039; is one of our favourite diagnostic tools, we do not want to disable echo replies on our machines (you might, ofcourse).&lt;br /&gt;
* net.ipv4.icmp_ignore_bogus_error_responses = 1&amp;lt;br&amp;gt;&lt;br /&gt;
* net.ipv4.conf.all.accept_redirects = 0&amp;lt;br&amp;gt;An ICMP redirect is an error message sent by a router to the sender of an IP packet. Redirects are used when a router believes a packet is being routed sub-optimally and it would like to inform the sending host that it should forward subsequent packets to that same destination through a different gateway. However, no network should &amp;#039;&amp;#039;need&amp;#039;&amp;#039; ICMP redirect; though ICMP redirects serve to point out issues with sub optimal routing, network re-architecting should be favored over their use. Well designed networks should never lend themselves to the reliance on or desire for ICMP redirects for reasons of performance, consistency, reliability, and security. Therefore, we see no need to enable this setting on our routers/gateway servers.&lt;br /&gt;
* net.ipv4.conf.all.rp_filter = 1&amp;lt;br&amp;gt;Enabling rp_filter means Reverse Path filtering; it enables the kernel to do Source Address Verification; this prevents spoofing attacks against our internal networks. If a network packet is incoming on an external interface with an internal source- and destination IP address (probably forged by an attacker), then the kernel will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; allow the packet, based on it having invalid source address. This should never harm legitimate network traffic, but will stop certain network attacks.&lt;br /&gt;
# (external addresses  can  still  be  spoofed)&lt;br /&gt;
* net.ipv4.conf.all.accept_source_route = 0&amp;lt;br&amp;gt;Source Routed packets can ask for a specific route; however they can be misused to route packets around firewalled interfaces. To our knowledge, no sane network configuration requires Source Routing these days, so we (explicitly) disable it.&lt;br /&gt;
* net.ipv4.tcp_syncookies = 0&amp;lt;br&amp;gt;By default SYNcookies are off, and we don&amp;#039;t enable them either, but if you believe you&amp;#039;re under a SYN attack, you might want to enable this setting (either for one time only, or permanently). Setting TCP SYN cookies enables SYN flood protection, but causes some problems as well, including masking legitimate overloading. WARNING - only enable SYN cookies if you really understand what it does!&lt;br /&gt;
* net.ipv4.conf/all/log_martians = 0&amp;lt;br&amp;gt;Setting log_martians &amp;quot;on&amp;quot; means the kernel will log to the kernel log all packets (including their source addresses) that have no known route. If it is set off, those &amp;quot;martians&amp;quot; are dropped silently. We usually don&amp;#039;t need logging on Martians, but you might want to enable it for diagnostic purposes.&lt;br /&gt;
&lt;br /&gt;
Note that we DON&amp;#039;T use &amp;#039;&amp;#039;sysctl.conf&amp;#039;&amp;#039; to enable forwarding on our multi-homed servers; it is too easy to make a mistake, and have a system with forwarding enabled and the firewall disabled. Therefor, we program our firewall to directly manipulate the forwarding property, and then only after the firewall is fully initilised.&lt;br /&gt;
&lt;br /&gt;
===Other settings===&lt;br /&gt;
Nope, that&amp;#039;s just it; we &amp;#039;&amp;#039;only&amp;#039;&amp;#039; make changes to the network settings :-)&lt;/div&gt;</summary>
		<author><name>Saruman!</name></author>
	</entry>
</feed>