| 
				
			 | 
			
			
				@@ -463,6 +463,7 @@ iptables -N syn_flood 
			 | 
		
	
		
			
			| 
				463
			 | 
			
				463
			 | 
			
			
				 iptables -A INPUT -p tcp --syn -j syn_flood 
			 | 
		
	
		
			
			| 
				464
			 | 
			
				464
			 | 
			
			
				 iptables -A syn_flood -m limit --limit 1/s --limit-burst 3 -j RETURN 
			 | 
		
	
		
			
			| 
				465
			 | 
			
				465
			 | 
			
			
				 iptables -A syn_flood -j DROP 
			 | 
		
	
		
			
			| 
				
			 | 
			
				466
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				466
			 | 
			
				467
			 | 
			
			
				 #Limiting the incoming icmp ping request: 
			 | 
		
	
		
			
			| 
				467
			 | 
			
				468
			 | 
			
			
				 iptables -A INPUT -p icmp -m limit --limit  1/s --limit-burst 1 -j ACCEPT 
			 | 
		
	
		
			
			| 
				468
			 | 
			
				469
			 | 
			
			
				 iptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 1 -j LOG --log-prefix PING-DROP: 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -482,6 +483,37 @@ chmod +x /etc/network/if-up.d/iptables 
			 | 
		
	
		
			
			| 
				482
			 | 
			
				483
			 | 
			
			
				 rm /tmp/firewall.sh 
			 | 
		
	
		
			
			| 
				483
			 | 
			
				484
			 | 
			
			
				 #+END_SRC 
			 | 
		
	
		
			
			| 
				484
			 | 
			
				485
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				486
			 | 
			
			
				+Also disable ping.  This may be inconvenient to some extent, but it seems common for malicious systems to try to disable the machine by flooding it with pings. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				487
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				488
			 | 
			
			
				+#+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				
			 | 
			
				489
			 | 
			
			
				+emacs /etc/sysctl.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				490
			 | 
			
			
				+#+END_SRC 
			 | 
		
	
		
			
			| 
				
			 | 
			
				491
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				492
			 | 
			
			
				+Uncomment or change the following: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				493
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				494
			 | 
			
			
				+#+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				
			 | 
			
				495
			 | 
			
			
				+net.ipv4.conf.all.accept_redirects = 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				496
			 | 
			
			
				+net.ipv6.conf.all.accept_redirects = 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				497
			 | 
			
			
				+net.ipv4.conf.all.send_redirects = 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				498
			 | 
			
			
				+net.ipv4.conf.all.accept_source_route = 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				499
			 | 
			
			
				+net.ipv6.conf.all.accept_source_route = 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				500
			 | 
			
			
				+net.ipv4.conf.default.rp_filter=1 
			 | 
		
	
		
			
			| 
				
			 | 
			
				501
			 | 
			
			
				+net.ipv4.conf.all.rp_filter=1 
			 | 
		
	
		
			
			| 
				
			 | 
			
				502
			 | 
			
			
				+#+END_SRC 
			 | 
		
	
		
			
			| 
				
			 | 
			
				503
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				504
			 | 
			
			
				+And append the following: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				505
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				506
			 | 
			
			
				+#+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				
			 | 
			
				507
			 | 
			
			
				+# ignore pings 
			 | 
		
	
		
			
			| 
				
			 | 
			
				508
			 | 
			
			
				+net.ipv4.icmp_echo_ignore_all = 1 
			 | 
		
	
		
			
			| 
				
			 | 
			
				509
			 | 
			
			
				+#+END_SRC 
			 | 
		
	
		
			
			| 
				
			 | 
			
				510
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				511
			 | 
			
			
				+Save and exit.  It may be a good idea to reboot at this point and then log back into the BBB using ssh.  You can do a safe reboot of the system by typing: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				512
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				513
			 | 
			
			
				+#+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				
			 | 
			
				514
			 | 
			
			
				+reboot 
			 | 
		
	
		
			
			| 
				
			 | 
			
				515
			 | 
			
			
				+#+END_SRC 
			 | 
		
	
		
			
			| 
				
			 | 
			
				516
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				485
			 | 
			
				517
			 | 
			
			
				 ** Install Email 
			 | 
		
	
		
			
			| 
				486
			 | 
			
				518
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				487
			 | 
			
				519
			 | 
			
			
				 #+BEGIN_VERSE 
			 |