<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://beardedmaker.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Linux_Security_%28random_notes%29</id>
		<title>Linux Security (random notes) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://beardedmaker.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Linux_Security_%28random_notes%29"/>
		<link rel="alternate" type="text/html" href="https://beardedmaker.com/wiki/index.php?title=Linux_Security_(random_notes)&amp;action=history"/>
		<updated>2026-04-26T12:33:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.4</generator>

	<entry>
		<id>https://beardedmaker.com/wiki/index.php?title=Linux_Security_(random_notes)&amp;diff=156&amp;oldid=prev</id>
		<title>Beard: Created page with &quot;&lt;pre&gt; tools: 	shred - securely delete files 	srm - securely delete files (part of package &quot;secure-delete&quot;) 	sfill - securely overwrite empty space. use tune2fs to free up rese...&quot;</title>
		<link rel="alternate" type="text/html" href="https://beardedmaker.com/wiki/index.php?title=Linux_Security_(random_notes)&amp;diff=156&amp;oldid=prev"/>
				<updated>2016-02-29T21:35:57Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; tools: 	shred - securely delete files 	srm - securely delete files (part of package &amp;quot;secure-delete&amp;quot;) 	sfill - securely overwrite empty space. use tune2fs to free up rese...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
tools:&lt;br /&gt;
	shred - securely delete files&lt;br /&gt;
	srm - securely delete files (part of package &amp;quot;secure-delete&amp;quot;)&lt;br /&gt;
	sfill - securely overwrite empty space. use tune2fs to free up reserved space. (part of package &amp;quot;secure-delete&amp;quot;)&lt;br /&gt;
	sswap - securely overwrite swap partition (part of package &amp;quot;secure-delete&amp;quot;)&lt;br /&gt;
	sdmem - securely overwrite free ram (part of package &amp;quot;secure-delete&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
method of overwriting free space:&lt;br /&gt;
	dd if=/dev/urandom of=random.small.file bs=1024 count=102400&lt;br /&gt;
	dd if=/dev/urandom of=random.file bs=1024&lt;br /&gt;
	sync ; sleep 60 ; sync&lt;br /&gt;
	rm random.small.file&lt;br /&gt;
	rm random.file&lt;br /&gt;
&lt;br /&gt;
sometimes data is stored in reserved space on filesystem. To manage this:&lt;br /&gt;
	sudo tune2fs -m 0 &amp;lt;device&amp;gt; - frees up reserved space&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysctl.conf to reflect the following changes:&lt;br /&gt;
&lt;br /&gt;
    net.ipv4.ip_forward = 0&lt;br /&gt;
    net.ipv4.conf.all.accept_source_route = 0&lt;br /&gt;
    net.ipv4.tcp_max_syn_backlog = 4096&lt;br /&gt;
    net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
    net.ipv4.tcp_syncookies = 1&lt;br /&gt;
    net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
    net.ipv4.conf.all.accept_redirects = 0&lt;br /&gt;
    net.ipv4.conf.default.accept_redirects = 0&lt;br /&gt;
Save changes to /etc/sysctl.conf and perform the following functions:&lt;br /&gt;
&lt;br /&gt;
    [root] # chown root:root /etc/sysctl.conf&lt;br /&gt;
    [root] # chmod 0600 /etc/sysctl.conf&lt;br /&gt;
    [root] # /etc/rc.d/init.d/network restart&lt;br /&gt;
&lt;br /&gt;
Brief examples of the changes made are outlined below. The appendix contains URLs that can be used to gain a further understanding of these defined parameters.&lt;br /&gt;
&lt;br /&gt;
net.ipv4.ip_forward = 0 – This parameter disables IP Forwarding. NOTE: IP Forwarding should be enabled (net.ipv4.ip_forward = 1) if the server will be acting as a gateway or router.&lt;br /&gt;
net.ipv4.conf.all.accept_source_route = 0 – This parameter disables IP Source Routing.&lt;br /&gt;
net.ipv4.tcp_max_syn_backlog = 4096 – This parameter enables SYN flood protection.&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1 – This parameter enables IP Spoofing protection.&lt;br /&gt;
net.ipv4.tcp_syncookies = 1 – This parameter enables TCP SYN Flood protection.&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0 – This parameter disables the ability to send ICMP Redirects.&lt;br /&gt;
net.ipv4.conf.all.accept_redirects = 0 – This parameter disables ICMP Redirect acceptance.&lt;br /&gt;
net.ipv4.conf.default.accept_redirects = 0 – This is another parameter that disables ICMP Redirect acceptance.&lt;br /&gt;
&lt;br /&gt;
commands which may be security risks:&lt;br /&gt;
	finger&lt;br /&gt;
	w&lt;br /&gt;
&lt;br /&gt;
intruders may try to use a buffer overrun to create binary files owned by root with SUID&lt;br /&gt;
	use 'find / -type f -perm +4000' to search for files with SUID&lt;br /&gt;
	compare the list to a normal system to find suspicious files&lt;br /&gt;
&lt;br /&gt;
intruders might create a ~/.forward with an email address that forwards the user's mail to that address.&lt;br /&gt;
	eliminate this by creating an empty ~/.forward file owned by root and no rw permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Beard</name></author>	</entry>

	</feed>