| 
				
			 | 
			
			
				@@ -502,9 +502,14 @@ echo 1 > /proc/sys/net/ipv4/tcp_syn_retries 
			 | 
		
	
		
			
			| 
				502
			 | 
			
				502
			 | 
			
			
				 # First of all delete any existing rules. 
			 | 
		
	
		
			
			| 
				503
			 | 
			
				503
			 | 
			
			
				 # This means you're back to a known state: 
			 | 
		
	
		
			
			| 
				504
			 | 
			
				504
			 | 
			
			
				 iptables -P INPUT ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				505
			 | 
			
			
				+ip6tables -P INPUT ACCEPT 
			 | 
		
	
		
			
			| 
				505
			 | 
			
				506
			 | 
			
			
				 iptables -F 
			 | 
		
	
		
			
			| 
				506
			 | 
			
				507
			 | 
			
			
				 iptables -X 
			 | 
		
	
		
			
			| 
				507
			 | 
			
				508
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				509
			 | 
			
			
				+# Drop any IPv6 traffic 
			 | 
		
	
		
			
			| 
				
			 | 
			
				510
			 | 
			
			
				+ip6tables -A INPUT -p tcp -j DROP 
			 | 
		
	
		
			
			| 
				
			 | 
			
				511
			 | 
			
			
				+ip6tables -A INPUT -p udp -j DROP 
			 | 
		
	
		
			
			| 
				
			 | 
			
				512
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				508
			 | 
			
				513
			 | 
			
			
				 # Drop access to unused ports 
			 | 
		
	
		
			
			| 
				509
			 | 
			
				514
			 | 
			
			
				 iptables -A INPUT -p tcp --destination-port 1 -j DROP 
			 | 
		
	
		
			
			| 
				510
			 | 
			
				515
			 | 
			
			
				 iptables -A INPUT -p tcp --destination-port 7 -j DROP 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -615,7 +620,9 @@ echo 'iptables-restore < /etc/firewall.conf' >> /etc/network/if-up.d/iptables 
			 | 
		
	
		
			
			| 
				615
			 | 
			
				620
			 | 
			
			
				 chmod +x /etc/network/if-up.d/iptables 
			 | 
		
	
		
			
			| 
				616
			 | 
			
				621
			 | 
			
			
				 #+END_SRC 
			 | 
		
	
		
			
			| 
				617
			 | 
			
				622
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				618
			 | 
			
				
			 | 
			
			
				-Save and exit 
			 | 
		
	
		
			
			| 
				
			 | 
			
				623
			 | 
			
			
				+Save and exit. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				624
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				625
			 | 
			
			
				+Note that this will disable IP version 6.  At the time of writing it is expected that the average internet user is running on IP version 4. 
			 | 
		
	
		
			
			| 
				619
			 | 
			
				626
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				620
			 | 
			
				627
			 | 
			
			
				 #+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				621
			 | 
			
				628
			 | 
			
			
				 chmod +x /tmp/firewall.sh 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -646,6 +653,9 @@ And append the following: 
			 | 
		
	
		
			
			| 
				646
			 | 
			
				653
			 | 
			
			
				 #+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				647
			 | 
			
				654
			 | 
			
			
				 # ignore pings 
			 | 
		
	
		
			
			| 
				648
			 | 
			
				655
			 | 
			
			
				 net.ipv4.icmp_echo_ignore_all = 1 
			 | 
		
	
		
			
			| 
				
			 | 
			
				656
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				657
			 | 
			
			
				+# disable ipv6 
			 | 
		
	
		
			
			| 
				
			 | 
			
				658
			 | 
			
			
				+net.ipv6.conf.all.disable_ipv6 = 1 
			 | 
		
	
		
			
			| 
				649
			 | 
			
				659
			 | 
			
			
				 #+END_SRC 
			 | 
		
	
		
			
			| 
				650
			 | 
			
				660
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				651
			 | 
			
				661
			 | 
			
			
				 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: 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -1210,7 +1220,7 @@ Then save and exit. 
			 | 
		
	
		
			
			| 
				1210
			 | 
			
				1220
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				1211
			 | 
			
				1221
			 | 
			
			
				 *** Rules for specific email addresses 
			 | 
		
	
		
			
			| 
				1212
			 | 
			
				1222
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				1213
			 | 
			
				
			 | 
			
			
				-You can also make a script which will allow you to add specific email addresses to a folder. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1223
			 | 
			
			
				+You can also make a script which will allow you to move mail from specific email addresses to a folder. 
			 | 
		
	
		
			
			| 
				1214
			 | 
			
				1224
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				1215
			 | 
			
				1225
			 | 
			
			
				 #+BEGIN_SRC: bash 
			 | 
		
	
		
			
			| 
				1216
			 | 
			
				1226
			 | 
			
			
				 emacs /usr/bin/emailrule 
			 |