<?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>tolaris.com &#187; networking</title>
	<atom:link href="http://www.tolaris.com/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using iperf and bwm-ng to measure throughput</title>
		<link>http://www.tolaris.com/2011/10/06/using-iperf-and-bwm-ng-to-measure-throughput/</link>
		<comments>http://www.tolaris.com/2011/10/06/using-iperf-and-bwm-ng-to-measure-throughput/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 20:58:33 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1518</guid>
		<description><![CDATA[I am often asked to measure the bandwidth of a network path. Many users test this using a simple HTTP download or with speedtest.net. Unfortunately, any test using TCP will produce inaccurate results, due to the limitations of a session-oriented protocol. TCP window size, latency, and the bandwidth of the return channel (for ACK messages) [...]]]></description>
			<content:encoded><![CDATA[<p>I am often asked to measure the bandwidth of a network path. Many users test this using a simple HTTP download or with <a href="http://www.speedtest.net">speedtest.net</a>. Unfortunately, any test using TCP will produce inaccurate results, due to the limitations of a session-oriented protocol. TCP window size, latency, and the bandwidth of the return channel (for ACK messages) all affect the results. The most reliable way to measure true bandwidth is with UDP. That&#8217;s where my friends <code>iperf</code> and <code>bwm-ng</code> come in handy.</p>
<p><span id="more-1518"></span><a href="http://sourceforge.net/projects/iperf">iperf</a> is a tool for measuring bandwidth and reporting on throughput, jitter, and data loss. Others have written <a href="http://openmaniak.com/iperf.php">handy tutorials</a>, but I&#8217;ll summarise the basics here.</p>
<p>iperf will run on any Linux or Unix (including Mac OSX), and must be installed on both hosts. Additionally, the &#8220;server&#8221; (receiving) host must allow incoming traffic to some port (which defaults to 5001/UDP and 5001/TCP). If you want to run bidirectional tests with UDP, this means you must open 5001/UDP on both hosts&#8217; firewalls.</p>
<p><code>iptables -I INPUT -p udp -m udp --dport 5001 -j ACCEPT</code></p>
<p>A network path is really two paths &#8211; the downstream path and the upstream (or return) path. With iperf, the &#8220;client&#8221; is the transmitter and the &#8220;server&#8221; is the receiver. So we&#8217;ll use the term &#8220;downstream&#8221; to refer to traffic transmitted from the client to the server, and &#8220;upstream&#8221; to refer to the opposite. Since these two paths can have different bandwidths and entirely different routes, we should measure them separately.</p>
<p>Start by opening terminal windows to both the client and server hosts, as well as the <a href="http://www.manpagez.com/man/1/iperf/">iperf man page</a>. On the server, you only have to start listening. This runs iperf as a server on the default 5001/UDP.</p>
<pre>root@server:~# iperf -s -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   124 KByte (default)
------------------------------------------------------------</pre>
<p>The server will output test results, as well as report them back to the client for display.</p>
<p>On the client, you have many options. You can push X data (-b) for Y seconds (-t). For example, to push 1 mbit for 10 seconds:</p>
<pre>root@client:~# iperf -u -c server.example.com -b 1M -t 10
------------------------------------------------------------
Client connecting to 172.16.0.2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.1 port 37731 connected with 172.16.0.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.19 MBytes  1000 Kbits/sec
[  3] Sent 852 datagrams
[  3] Server Report:
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.19 MBytes  1.00 Mbits/sec  0.842 ms    0/  852 (0%)</pre>
<p>You can request that the server perform a reverse connection to test the return path, either at the same time (-d, dual test) or in series (-r, tradeoff). This causes both ends to temporarily start both a client and a server.</p>
<pre>root@client:~# iperf -u -c server.example.com -b 1M -t 10 -r
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.16.0.2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.1 port 46297 connected with 172.16.0.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.19 MBytes  1000 Kbits/sec
[  4] Sent 852 datagrams
[  4] Server Report:
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  4]  0.0-10.0 sec  1.19 MBytes    998 Kbits/sec  0.250 ms    2/  852 (0.23%)
[  3] local 192.168.1.1 port 5001 connected with 172.16.0.2 port 34916
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.19 MBytes  1.00 Mbits/sec  0.111 ms    0/  851 (0%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order</pre>
<p>The above shows first the client->server transmission, then the server->client transmission. If it seems hard to read, each simultaneous link has an ID such as &#8220;[ 3]&#8220;, and look for port 5001 to identify the host that is receiving data.</p>
<p>You can also specify the datagram size. Many devices have limits on packets per second, which means you can push more data with 1470-byte datagrams than with 64-byte datagrams. The same link tested with 64-byte datagrams (requiring nearly 20,000 packets where previously we needed only 852) showed 6% packet loss:</p>
<pre>root@client:~# iperf -u -c server.example.com -b 1M -t 10 -l 64
------------------------------------------------------------
Client connecting to 172.16.0.2, UDP port 5001
Sending 64 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.1 port 47784 connected with 172.16.0.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.19 MBytes  1000 Kbits/sec
[  3] Sent 19533 datagrams
[  3] Server Report:
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.11 MBytes    933 Kbits/sec  0.134 ms 1294/19533 (6.6%)</pre>
<p>To find the total packet size, add 28 bytes to the datagram size for UDP+IP headers. For instance, setting 64-byte datagrams causes iperf to send 92-byte packets. Exceeding the <a href="http://en.wikipedia.org/wiki/Maximum_transmission_unit">MTU</a> can produce even more interesting results, as packets are fragmented.</p>
<p>iperf provides final throughput results at the end of each test. However, I sometimes find it handy to get results as the test is running, or to report on packets/second. That&#8217;s when I use <a href="http://www.gropp.org/?id=projects&#038;sub=bwm-ng">bwm-ng</a>.</p>
<p>Try opening two more terminals, one each to the client and server. In each, start bwm-ng.</p>
<pre>root@client:~# bwm-ng -u bits -t 1000

  bwm-ng v0.6 (probing every 1.000s), press 'h' for help
  input: /proc/net/dev type: rate
  |         iface                   Rx                   Tx                Total
  ==============================================================================
               lo:           0.00 Kb/s            0.00 Kb/s            0.00 Kb/s
             eth0:           0.00 Kb/s         1017.34 Kb/s         1017.34 Kb/s
             eth1:           0.00 Kb/s            0.00 Kb/s            0.00 Kb/s
  ------------------------------------------------------------------------------
            total:           0.00 Kb/s         1017.34 Kb/s         1017.34 Kb/s</pre>
<p>By default, bwm-ng shows bytes/second. Press &#8216;u&#8217; to cycle through bytes, bits, packets, and errors per second. Press &#8216;+&#8217; or &#8216;-&#8217; to change the refresh time. I find that 1 or 2 seconds produces more accurate results on some hardware. Press &#8216;h&#8217; for handy in-line help.</p>
<p>Now, start the same iperf tests. Any packet losses will be immediately apparent, as the throughput measurements won&#8217;t match. The client will show 1 mbit in the Tx column, while the server will show a lower number in the Rx column.</p>
<p>However, bwm-ng will not differentiate between traffic from iperf and other traffic at the same time. When that happens, it is still useful to use the packets/sec display to find the maximum packet throughput limits of your hardware.</p>
<p>One warning to those who want to test TCP throughput with iperf: you cannot specify the data rate. Instead, iperf in TCP mode will scale up the data rate until it finds the maximum safe window size. For low-latency links, this is generally 85% of the true channel bandwidth as measured by UDP tests. However, as latency increases, TCP bandwidth decreases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2011/10/06/using-iperf-and-bwm-ng-to-measure-throughput/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sniffing on a switch</title>
		<link>http://www.tolaris.com/2010/11/26/sniffing-on-a-switch/</link>
		<comments>http://www.tolaris.com/2010/11/26/sniffing-on-a-switch/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 21:34:36 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=937</guid>
		<description><![CDATA[I&#8217;m an IP network engineer. When something goes wrong, the first thing I do is sniff packets. Got a SIP phone that won&#8217;t register? Forget reading logs; sniff 5060/udp and read the SIP chatter directly. A customer complains that &#8220;Yahoo chat doesn&#8217;t work&#8221;? Sniff 5050/tcp and look for TCP hangups, login failures, or ICMP &#8220;port [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m an IP network engineer. When something goes wrong, the <em>first</em> thing I do is sniff packets. Got a SIP phone that won&#8217;t register? Forget reading logs; sniff 5060/udp and read the SIP chatter directly. A customer complains that &#8220;Yahoo chat doesn&#8217;t work&#8221;? Sniff 5050/tcp and look for TCP hangups, login failures, or ICMP &#8220;port unreachable&#8221; messages.</p>
<p>Sniffing is easy when you have access to the intermediate router, but that isn&#8217;t always the case. What if you&#8217;re just another PC on the same switch? That&#8217;s impossible, right?</p>
<p><span id="more-937"></span>I&#8217;m not the <a href="http://www.linuxjournal.com/article/5869">first</a> <a href="http://www.irongeek.com/i.php?page=security/ettercapfilter">person</a> <a href="http://www.irongeek.com/i.php?page=security/arpspoof">to</a> <a href="http://seclists.org/pen-test/2005/Oct/235">write</a> about this. Switches are not immune to sniffing. There are three techniques for sniffing traffic on an Ethernet switch:</p>
<ol>
<li>Use a monitor port. With a managed switch, configure one port to receive copies of data sent to other port(s). Useful if you have administrator access to a managed switch.</li>
<li>MAC flooding. Fill up the switch&#8217;s MAC table with false entries, causing it to failover into broadcast mode. All packets will be sent to all ports. Easy to detect and hard to do on modern switches.</li>
<li><a href="http://en.wikipedia.org/wiki/ARP_spoofing">ARP poisoning</a>. Send unsolicited ARP responses to the target devices (for instance, a PC and its default gateway), telling them to direct traffic to you. Silently route their traffic so they don&#8217;t notice an interruption.</li>
</ol>
<p>It is the last technique that I want to discuss. Many tools exist to poison ARP, from simple command line utilities like arpspoof (part of <a href="http://en.wikipedia.org/wiki/DSniff">dsniff</a>), <a href="http://www.securiteam.com/tools/5QP0I2AC0I.html">seringe</a>, and <a href="http://sid.rstack.org/arp-sk/">arp-sk</a>, to full-featured man-in-the-middle attack suites like <a href="http://ettercap.sourceforge.net/">Ettercap</a>. Ettercap can poison ARP caches, sniff packets and write them to files, route traffic, and filter/change traffic content. You can find a very helpful <a href="http://openmaniak.com/ettercap_arp.php">step-by-step Ettercap tutorial here</a>, so I won&#8217;t cover the same ground. I&#8217;d rather explain what these tools do.</p>
<p>ARP poisoning attacks work by sending gratuitous ARP replies to two targets, informing each of them that the attacker&#8217;s PC is the opposite target. For instance, suppose I have three devices:</p>
<ol>
<li><em>gateway</em>, a router on 192.168.0.1, with MAC 00:1d:73:36:ad:0c</li>
<li><em>alice</em>, a PC on 192.168.0.101, with MAC 00:13:02:02:56:da</li>
<li>My PC on 192.168.0.102, with MAC 00:17:09:d2:30:25</li>
</ol>
<p>Alice knows Gateway&#8217;s MAC address:</p>
<pre>user@alice:~$ ip neigh show
192.168.0.1 dev wlan0 lladdr 00:1d:73:36:ad:0c REACHABLE</pre>
<p>Gateway knows Alice&#8217;s MAC address:</p>
<pre>user@gateway:~$ ip neigh show
192.168.0.101 dev eth1 lladdr 00:13:02:02:56:da REACHABLE</pre>
<p>When I start the ARP poisoning attack, both Alice and Gateway learn different MAC addresses for each other:</p>
<pre>user@alice:~$ ip neigh show
192.168.0.1 dev wlan0 lladdr 00:17:09:d2:30:25 REACHABLE

user@gateway:~$ ip neigh show
192.168.0.101 dev eth1 lladdr 00:17:09:d2:30:25 REACHABLE</pre>
<p>Now Alice will send traffic for Gateway (probably all Internet traffic) to my PC, and Gateway will do the same for traffic intended for Alice. If we stop here, we&#8217;ll be able to see what Alice is trying to do, but Alice will quickly realise something is wrong because traffic will stop without explanation.</p>
<p>This is the second part of ARP poisoning (and of any Man-in-the-Middle attack): silently routing traffic onward. You can use the kernel&#8217;s IP forwarding to do this:</p>
<p><code>echo 1 > /proc/sys/net/ipv4/ip_forward</code></p>
<p>But if you do, you&#8217;ll appear in Alice&#8217;s traceroute path:</p>
<pre> 1  192.168.0.102   2.580 ms  2.754 ms  3.312 ms
 2  192.168.0.1  1.530 ms  2.321 ms  2.964 ms
 3  192.168.1.254  60.537 ms  60.028 ms  59.573 ms
 4  79.86.25.1  19.854 ms  16.007 ms  17.413 ms
 5  ....</pre>
<p>If you use &#8220;unified sniffing&#8221; with Ettercap, it will silently route traffic in software. Other tools, such as fragrouter (also part of dsniff), can do the same thing from the command line. Both of these tools forward traffic without decrementing the TTL, which makes them invisible to traceroute.</p>
<p>ARP poisoning is not silent. It can be detected by both hosts, because you are manipulating their ARP tables. These gratuitous ARP replies are easily visible with a sniffer:</p>
<pre> 0.636848 00:17:09:d2:30:25 -> 00:1d:73:36:ad:0c ARP 192.168.0.1 is at 00:17:09:d2:30:25
 0.637622 00:17:09:d2:30:25 -> 00:13:02:02:56:da ARP 192.168.0.101 is at 00:17:09:d2:30:25
 10.680712 00:17:09:d2:30:25 -> 00:1d:73:36:ad:0c ARP 192.168.0.1 is at 00:17:09:d2:30:25
 10.684618 00:17:09:d2:30:25 -> 00:13:02:02:56:da ARP 192.168.0.101 is at 00:17:09:d2:30:25</pre>
<p>Most tools send these ARP replies regularly, to keep ARP table entries from timing out. For instance, Ettercap sends them every 10 seconds. This is suspicious, as ARP requests are normally only seen when a host is first discovering another one. It is necessary to prevent true ARP requests from briefly changing the ARP table back to its correct state. Several tools exist to detect or prevent ARP poisoning, like <a href="http://arpon.sourceforge.net/">ArpON</a>, <a href="http://en.wikipedia.org/wiki/Arpwatch">arpwatch</a>, and <a href="http://en.wikipedia.org/wiki/DHCP_snooping">DHCP snooping</a>.</p>
<p>I&#8217;ve used traditional security terms like &#8220;victim&#8221; and &#8220;attacker&#8221; in this post, and of course ARP poisoning is a useful technique for unauthorised spying. However, it has legitimate uses. I&#8217;ve used it a number of times in situations where I had to sniff but couldn&#8217;t interrupt the physical cabling or didn&#8217;t have a managed switch. Whatever the problem, there is no faster way to understand a network problem than sniffing the raw data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/11/26/sniffing-on-a-switch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Troubleshooting path MTU problems</title>
		<link>http://www.tolaris.com/2010/04/08/troubleshooting-path-mtu-problems/</link>
		<comments>http://www.tolaris.com/2010/04/08/troubleshooting-path-mtu-problems/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 20:26:21 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=765</guid>
		<description><![CDATA[Not long ago we started having very unusual issues our email servers. Mail would be inexplicably held for delivery, bounce back, or fail to send for hours and then send without issue later. Some users couldn&#8217;t fetch email by POP until they restarted their mail client. We investigated the mail software, but weeks of investigation [...]]]></description>
			<content:encoded><![CDATA[<p>Not long ago we started having very unusual issues our email servers. Mail would be inexplicably held for delivery, bounce back, or fail to send for hours and then send without issue later. Some users couldn&#8217;t fetch email by POP until they restarted their mail client. We investigated the mail software, but weeks of investigation turned up nothing.</p>
<p>Around the same time, we also experienced intermittent problems logging in to MSN Messenger, and some users complained of issues accessing certain web pages, including a lot of HTTPS links. I began to suspect these were related.</p>
<p><span id="more-765"></span>When the going gets tough, the tough sniff packets. We can sniff at any point in our core routing network, which is by far the most effective way to find a networking problem. And so I found this:</p>
<pre>root@router1:~# tshark
  1   0.000000 10.0.2.1 -> 192.168.3.155 ICMP Destination unreachable (Fragmentation needed)</pre>
<p>10.0.2.1 is the upstream router from one of our network providers. 192.168.3.155 is one of our servers.  So something is definitely wrong upstream of us.</p>
<p>It&#8217;s possible to do most troubleshooting with <code>tshark</code> (wireshark&#8217;s command-line form). But I prefer to use SCP to copy the capture file back to my PC and investigate it in the GUI. I captured a few more packets and saved them:</p>
<p><code>tshark -i eth0 -f 'host 10.0.2.1' -w /tmp/upstream.cap -S</code></p>
<p>This sniffs on eth0 for packets to or from 10.0.2.1 and saves them to /tmp/upstream.cap while showing me a running summary. I let this run until a few more ICMP errors are captured, then hit Ctrl-C to cancel. I can then either copy the file back to my PC and open it with Wireshark, or directly open it using KDE&#8217;s &#8220;fish://&#8221; KIO handler.  Try opening a URL like this in Dolphin:</p>
<p><code>fish://root@192.168.0.1/tmp/</code></p>
<p>Just right-click and open the file with Wireshark, and KDE will transparently download the file and start Wireshark for you.</p>
<p>I selected one of the offending packets and saw a packet from 10.0.2.1 with this:</p>
<p><img src="http://www.tolaris.com/blog/wp-content/uploads/2010/04/icmp-frag-needed.png" alt="" title="icmp-frag-needed" width="380" height="115" class="alignnone size-full wp-image-768" /></p>
<p>This shows that the MTU of the link between 10.0.2.1 and the next router is 1496 bytes. To explain further, we need to understand how IP and Ethernet MTU interact.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Maximum_transmission_unit">MTU</a>, or maximum transmission unit, for a normal Ethernet network is typically 1500 bytes. This means that an Ethernet packet may contain up to 1500 bytes of data exclusive of the Ethernet headers. As data moves from one Ethernet to the next, as in the case of all traffic routed over the Internet, it must not exceed that Ethernet&#8217;s MTU. If it does, the packet is <em>fragmented</em>, split into smaller packets and transmitted as two or more smaller packets.</p>
<p>IP normally allows for fragmentation. This is an inefficient but effective solution, given that a host on the Internet doesn&#8217;t usually know the lowest MTU of the entire path between it and the target it would like to reach. However, IP packets contain a flag in the header, &#8220;Do not fragment&#8221;. If this bit is set, and a packet needs to be fragmented due to a smaller MTU, it cannot be transmitted onward. The router where this happens will drop the packet and return an <a href="http://en.wikipedia.org/wiki/ICMP_Destination_Unreachable">ICMP type 3, code 4</a> message, &#8220;Destination unreachable, fragmentation needed but &#8216;do not fragment&#8217; is set.&#8221;</p>
<p>Now that I know what to look for, I can find all kinds of MTU issues.</p>
<p><code>tshark -i eth0 -f 'icmp[icmptype] == 3 and icmp[icmpcode] == 4' -w /tmp/frag.cap -S</code></p>
<p>Watching this for a while, I found a lot of remote networks with lower than normal MTUs. ICMP error messages contain copies of the IP and TCP/UDP headers of the offending packet, which makes it easy to find what triggered it. I found several examples of SMTP traffic with &#8220;do not fragment&#8221; set, trying to enter networks with MTUs as low as 300 bytes. But these are remote networks, and are someone else&#8217;s problem to fix. What I shouldn&#8217;t have is a low MTU immediately upstream, affecting all my traffic.</p>
<p>Now I know I have an MTU problem. But is this the cause of all my problems? I sniffed again, this time trying to login to MSN. The router at 10.0.2.1 again returned an error:</p>
<p><img src="http://www.tolaris.com/blog/wp-content/uploads/2010/04/MTU-MSN-failure.png" alt="" title="MTU MSN failure" width="869" height="183" class="alignnone size-full wp-image-773" /></p>
<p>This one told me the cause of the MSN problem. As part of its authentication, MSN Messenger logs in (to 65.54.165.177) via HTTPS (TCP port 443), with a 1500-byte packet which has the &#8220;do not fragment&#8221; bit set.</p>
<p>Some solutions to the problem of <a href="http://en.wikipedia.org/wiki/Path_MTU_discovery">MTU path discovery</a> exist. Sniffing identified the problem to my satisfaction. But you can test more directly by using a traceroute tool that supports MTU discovery. The process is simple: perform traceroute using IP packets of size 1500 bytes with &#8220;do not fragment&#8221; set. If they are rejected, back off to the &#8220;MTU of next hop&#8221; value and repeat until you reach your target. On Linux, use <code>tracepath</code> or <code>traceroute --mtu</code>.</p>
<pre>root@router1:~# tracepath -n 4.2.2.2
 1:  192.168.101.3    0.236ms pmtu 1500
 1:  192.168.101.1    14.080ms
 1:  192.168.101.1    1.985ms
 2:  192.168.1.254    70.445ms
 3:  10.86.24.1       32.215ms
 4:  no reply
 5:  no reply
 6:  212.113.15.19    37.143ms asymm  7
 7:  4.69.139.97      34.641ms
 8:  4.69.132.134     44.419ms
 9:  4.69.141.169     38.904ms
10:  4.69.133.90      41.321ms
11:  4.69.141.149     41.615ms
12:  4.69.132.138     45.783ms
13:  4.69.140.22      46.130ms
14:  4.68.23.195      46.663ms
15:  no reply
16:  4.2.2.2          45.328ms reached
     Resume: pmtu 1500 hops 16 back 241</pre>
<p>A path MTU problem will appear as a drop in MTU:</p>
<pre> 1:  192.168.101.3    0.281ms pmtu 1500
 1:  192.168.101.1    12.194ms
 2:  192.168.1.254    69.332ms pmtu 1496
 3:  10.86.24.1       35.182ms</pre>
<p>On Windows, try <a href="http://www.elifulkerson.com/projects/mturoute.php">mturoute</a>. On Mac OS X, try <code>traceroute -F google.com 1500</code>.</p>
<p>I reported the problem to our upstream provider and included the tracepath output and a few packets captured during testing. They scheduled a maintenance window for the following afternoon and corrected the problem with two minutes of down time. We haven&#8217;t had an issue with email, MSN, or web pages since.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/04/08/troubleshooting-path-mtu-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables firewall templates</title>
		<link>http://www.tolaris.com/2010/03/29/iptables-firewall-templates/</link>
		<comments>http://www.tolaris.com/2010/03/29/iptables-firewall-templates/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 18:39:28 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=741</guid>
		<description><![CDATA[I use iptables firewalls on every server I administer, including all of our core routers (which run Linux too). There are lots of tools to easily configure a firewall. For simple tasks, Ubuntu now installs ufw by default, which has both command-line and GUI tools. For servers, consider Webmin. If you want to do something [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.netfilter.org/">iptables</a> firewalls on every server I administer, including all of our core routers (which run Linux too). There are lots of tools to easily configure a firewall. For simple tasks, Ubuntu now installs <a href="http://en.wikipedia.org/wiki/Uncomplicated_Firewall">ufw</a> by default, which has both command-line and GUI tools. For servers, consider <a href="http://www.webmin.com">Webmin</a>.</p>
<p>If you want to do something more complicated, or prefer editing iptables rules yourself, you&#8217;ll have to do it by hand.  When I first started doing this I found a template online and edited it to suit my need.  Over time I&#8217;ve learned a lot more about iptables, and my templates have evolved.</p>
<p><span id="more-741"></span>Here is a simple basic firewall.  The outline is taken from the output of <code>iptables-save</code>, and then hand-edited.  I&#8217;ve left comments in to explain what each section does.</p>
<pre>*filter
:FORWARD ACCEPT [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
# Accept all loopback traffic
-A INPUT -i lo -j ACCEPT
# Drop invalid/unknown/spoofed TCP sessions
-A INPUT -p tcp ! --syn -m state --state NEW -j DROP
# Accept new sessions
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Accept important ICMP types
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 4 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT
# Accept known services
-A INPUT -p tcp -m tcp -m multiport --dports 22,25,80,443,465,587,993,995 -j ACCEPT
-A INPUT -p udp -m udp -m multiport --dports 53,5353 -j ACCEPT
COMMIT
</pre>
<p>Edit the last two lines for your specific services, and then save the file as /etc/iptables.up.rules and restore it:</p>
<p><code>iptables-restore < /etc/iptables.up.rules</code></p>
<p>The above is a default-deny firewall which allows all outgoing and loopback traffic, but filters incoming connections.  This means that anything not specifically allowed will be dropped without notice.</p>
<p>Suppose you want to do this at your router to protect all your servers.  Assuming:</p>
<ol>
<li>The router is the default gateway for both servers</li>
<li>server1 at 192.168.0.100 is a mail server offering SMTP, POP, POP-SSL, IMAP, and IMAP-SSL</li>
<li>server2 at 192.168.0.101 is a web server offering HTTP, HTTPS, and DNS</li>
<li>all servers offer SSH, including the router</li>
</ol>
<p>For routed (forwarded) traffic, you must use the FORWARD chain. In addition to ACCEPT and DROP, chains can call other named chains. I recommend creating a chain for each server you want to protect.</p>
<pre>*filter
:FORWARD DROP [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
:server1 - [0:0]
:server2 - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp ! --syn -m state --state NEW -j DROP
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 4 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT
# if just a single port, you can avoid the multiport match extension and use dport
-A INPUT -p tcp -m tcp --dport 22  -j ACCEPT
# put common rules first
-A FORWARD -p tcp ! --syn -m state --state NEW -j DROP
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 4 -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type 12 -j ACCEPT
# all servers offer SSH
-A FORWARD -p tcp -m tcp --dport 22  -j ACCEPT
# send specific traffic to custom rules
-A FORWARD -d 192.168.0.100 -j server1
-A FORWARD -d 192.168.0.101 -j server2
-A server1 -p tcp -m tcp -m multiport --dports 25,110,143,993,995 -j ACCEPT
-A server2 -p tcp -m tcp -m multiport --dports 80,443 -j ACCEPT
-A server2 -p udp -m udp --dport 53 -j ACCEPT
COMMIT
</pre>
<p>It's possible to reduce complexity by putting the common rules in another chain and calling it from both INPUT and FORWARD:</p>
<pre>*filter
:FORWARD DROP [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
:common_fw - [0:0]
:server1 - [0:0]
:server2 - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -j common_fw
-A FORWARD -j common_fw
-A FORWARD -d 192.168.0.100 -j server1
-A FORWARD -d 192.168.0.101 -j server2
-A common_fw -p tcp ! --syn -m state --state NEW -j DROP
-A common_fw -m state --state ESTABLISHED,RELATED -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 4 -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A common_fw -p icmp -m icmp --icmp-type 12 -j ACCEPT
-A common_fw -p tcp -m tcp --dport 22  -j ACCEPT
-A server1 -p tcp -m tcp -m multiport --dports 25,110,143,993,995 -j ACCEPT
-A server2 -p tcp -m tcp -m multiport --dports 80,443 -j ACCEPT
-A server2 -p udp -m udp --dport 53 -j ACCEPT
COMMIT
</pre>
<p>Where to save and how to load your rules depends on the distribution.  Ubuntu and Debian don't have a standard way to load an iptables ruleset on boot.  So I borrowed Webmin's practice of putting a line in /etc/network/interfaces:</p>
<pre># The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.2
        netmask 255.255.255.0
        gateway 192.168.0.1
        post-up iptables-restore < /etc/iptables.up.rules</pre>
<p>Users of RPM-based systems like Fedora, RHEL, and CentOS have it easier. Save your rules in /etc/sysconfig/iptables, and they'll be loaded at boot or whenever you restart networking. However, Red Hat systems come with a simple firewall manager named lokkit, which creates its own unusual chains like "RH-Firewall-1-INPUT". Here is an example from a CentOS 4 server I administer:</p>
<pre>*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited</pre>
<p>You should never expect your hand-edited files to work with a firewall management tool like ufw or lokkit.  However, if you are careful to obey the expected format these tools use, you can make small edits by hand while still using the tool.  For instance, all of my templates are compatible with Webmin's firewall editor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/03/29/iptables-firewall-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flying without a net: safe techniques for working remotely</title>
		<link>http://www.tolaris.com/2010/02/28/flying-without-a-net/</link>
		<comments>http://www.tolaris.com/2010/02/28/flying-without-a-net/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 22:16:17 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=705</guid>
		<description><![CDATA[I try to post a few times each month, but somehow January (and most of February) fell through the cracks. Lately I&#8217;ve been busy with operational tasks, which hasn&#8217;t left me much room for engineering. I haven&#8217;t solved any particularly hard or unusual problems, which is usually what I write about. Instead, I&#8217;ll write about [...]]]></description>
			<content:encoded><![CDATA[<p>I try to post a few times each month, but somehow January (and most of February) fell through the cracks.  Lately I&#8217;ve been busy with operational tasks, which hasn&#8217;t left me much room for engineering.  I haven&#8217;t solved any particularly hard or unusual problems, which is usually what I write about.  Instead, I&#8217;ll write about a routine problem that is nonetheless tricky enough to warrant discussion.</p>
<p>Most of the time I&#8217;m not in the same country as the servers I administer.  Which means I can&#8217;t just drive down and fix something when it goes wrong.  It also means that making changes to the network is particularly dangerous.  So is updating the kernel, initrd, or GRUB configuration.  It is possible to leave a server in a state that requires you to be physically present to fix it.  I call this kind of work &#8220;flying without a net&#8221;.  Here are my techniques for safely working without console access.</p>
<p><span id="more-705"></span>The most useful tool in my bag is <a href="http://www.gnu.org/software/screen/">GNU screen</a>.  Screen acts as a window/terminal manager inside a terminal.  This means you can open one SSH session to a server but start multiple bash logins and multi-task from one terminal window.  What&#8217;s more, screen is persistent.  This means you can disconnect from it and return later, and your programs are still running.  Even if your network access is interrupted, anything running in screen will complete rather than terminating when your login session does.</p>
<p>Screen is the safest way, short of console login, to make network changes.  Want to run &#8220;<code>ifdown eth0 ; ifup eth0</code>&#8220;?  Try it and you&#8217;ll likely find that the first command will interrupt the network and the second command will never run.  Your server is now off the network, and you can&#8217;t fix it without console access.  If you had used screen, you wouldn&#8217;t be ringing the on-call staff and suffering a service outage.</p>
<p>For me, the most common way to lose access to a server is to make a mistake while changing the network configuration.  This could be the firewall, the IP configuration, tunable kernel networking parameters (sysctl), or something as simple as stopping the OpenSSH server.  The first rule is: the server always boots in a known good configuration.  Don&#8217;t write changes to any startup configuration files until they are tested.  When testing, tell the server to restart if the new configuration is bad.</p>
<p>How do you do this?  With <code>shutdown -r +5m</code>.  This will instruct the server to reboot in 5 minutes.  Then, make your changes.  If they work, cancel the shutdown with <code>shutdown -c</code>.  If they don&#8217;t, the server will reboot in 5 minutes on the known, working configuration.  Five minutes of down time may be unpleasant, but it is a lot better than sending an engineer.</p>
<p>This means you must test your configuration changes with temporary files.  Most commands that use configuration files take an argument to read an alternate file.</p>
<p><code>cp /etc/network/interfaces /etc/network/interfaces.new<br />
vi /etc/network/interfaces.new<br />
ifdown eth0<br />
ifup -i /etc/network/interfaces.new eth0</code></p>
<p>Another simple trick is to have a private IP address configured on a virtual interface (eth0:1).  Do this for all your servers.  If you lose access to one server, you can SSH into another on the same LAN, then SSH into the affected server using the private IP.  In rare cases I&#8217;ve set a bad route or default gateway, but found I could reach the server from another on the same IP subnet.</p>
<p>Always keep an active SSH session when making changes to the OpenSSH server.  Don&#8217;t test by logging out of your current shell and then logging in again.  Open a new terminal and test in that one.  The OpenSSH server only controls new SSH sessions, not existing ones.  So you can upgrade or restart the SSH service without losing your open shell.</p>
<p>This applies to firewall changes as well.  A typical firewall config accepts all existing, recognised connections before filtering new ones.  If you firewall port 22/tcp, you may not be able to open a new session, but your existing ones will probably continue to work.</p>
<p>Install <a href="http://www.webmin.com/">webmin</a>.  If you break the OpenSSH server or run afoul of your own firewall, you may be able to login via webmin and fix it.  Webmin has native brute-force protection and uses SSL, so you aren&#8217;t decreasing your security by installing it.  It has saved me more than once.</p>
<p>Be wary of anything that affects the boot process itself.  That means GRUB, the kernel, and the initrd image.  If you use software RAID on the root partition, make sure that initrd image has all the tools you may need to boot:</p>
<p><code>apt-get install mdadm evms dmsetup lvm2</code></p>
<p>In general, it is safe to upgrade or reboot if you use your distribution&#8217;s standard software repositories and don&#8217;t change the default configurations.  If you compile your own kernel or do anything fancy with GRUB, ensure you have console access.</p>
<p>If you have the resources, model changes to a server in a virtual machine first.  Today, &#8220;resources&#8221; only means a mid-range laptop and <a href="http://www.virtualbox.org/">Virtualbox</a>.  Create a virtual network environment that is identical to the real one, using the same IP addresses but only accessible to you.  Test your changes, then apply them to the real server only if they work.</p>
<p>These techniques are <strong>no substitute</strong> for professional server administration.  Standard policy at my company is that all servers are installed on <a href="http://www.apc.com/products/family/index.cfm?id=70">network-aware PDUs</a> and connected to <a href="http://www.adder.com/uk/kvm-over-ip-switches.aspx">IP-capable KVM units</a>.  This means I can remotely reboot a server by the power switch, or login as if I were on a local keyboard and monitor.  This means I have access to BIOS, bootable network/RAID cards, the GRUB boot menu, a minimal recovery shell (such as when <code>fsck</code> fails), or the regular console.  You can&#8217;t get any of that with GNU screen or any tool that runs on the server itself.</p>
<p>If you have more than four physical servers, installing a network PDU and KVM will cost less than 15% of the servers themselves and will save you a lot of trouble in on-site support fees and lost time.  And they will allow your engineers to do scheduled maintenance at late hours from home.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/02/28/flying-without-a-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VLANs, bridges, and virtual machines</title>
		<link>http://www.tolaris.com/2010/02/20/vlans-bridges-and-virtual-machines/</link>
		<comments>http://www.tolaris.com/2010/02/20/vlans-bridges-and-virtual-machines/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:44:38 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=686</guid>
		<description><![CDATA[We run several virtual machine host servers on a network with multiple VLANs. The virtual machines are members of different VLANs, but are not themselves aware of the VLAN. This is how we did it. We use KVM for virtualisation, but I&#8217;m not going to discuss the details here. Like any virtualisation solution, KVM starts [...]]]></description>
			<content:encoded><![CDATA[<p>We run several virtual machine host servers on a network with multiple VLANs.  The virtual machines are members of different VLANs, but are not themselves aware of the VLAN.  This is how we did it.</p>
<p><span id="more-686"></span>We use <a href="http://www.linux-kvm.org">KVM</a> for virtualisation, but I&#8217;m not going to discuss the details here.  Like any virtualisation solution, KVM starts a virtual machine and attaches its virtual network hardware to a network interface on the host OS.  What I want to discuss is how to implement the networking layer.</p>
<p>I <a href="http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/">previously wrote</a> about creating a network bridge for Virtualbox virtual machines, and we&#8217;re going to do something similar here.  However, we want to implement VLAN support and native 802.1q VLAN tagging at the same time.</p>
<p>The design:</p>
<ul>
<li>The physical server is connected to the Ethernet switch via a 802.1q VLAN tagged trunk port</li>
<li>The host OS is aware of the trunk port, and implements several virtual network interfaces.  Each virtual  interface is associated with one VLAN.  Any traffic on that virtual interface exits the physical network interface as tagged VLAN packets.</li>
<li>The host OS provides a network bridge for each VLAN, and adds the virtual VLAN interface to the bridge.</li>
<li>The guest OSes (virtual machines) are not VLAN-aware.  They have a normal ethernet interface which requires no special configuration.</li>
<li>The virtualisation software (KVM, in this case) attaches the network interface of the guest OS to the VLAN-specific network bridge.</li>
</ul>
<p>Warning: changing the Ethernet setup to your server can cause you to lose access to it.  At all times during this process, ensure you have console access to the server, and network or console access to the switch.</p>
<p>That said, we&#8217;ll try to time the network interruption such that we don&#8217;t lose access.  First, configure your server for VLAN networking.  This guide assumes the server runs Ubuntu 8.04 &#8220;Hardy Heron&#8221;, but the steps are similar for any recent Ubuntu release.  I have no idea how Red Hat handles VLANs and bridging, but I invite you to provide the steps in comments.</p>
<p>This guide also assumes the server is connected to a VLAN unaware (access) port, on VLAN 100, with an existing /etc/network/interfaces like so:</p>
<pre># The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1</pre>
<p>Finally, we assume that virtual machines will be attached to either VLAN 100 (the same as the host OS&#8217;s own traffic) or VLAN 200.  So we&#8217;ll prepare support for both.</p>
<p>Install vlan and bridge support.<br />
<code>apt-get install vlan bridge-utils</code></p>
<p>Then edit /etc/network/interfaces.  Modify the existing network setup to be aware of VLAN 100, and to create a bridge on it.</p>
<pre>
# The loopback network interface
auto lo
iface lo inet loopback          

# LAN uses VLAN trunking, so set any IP addresses on appropriate bridge
auto eth0
iface eth0 inet manual
	up ifconfig eth0 up

# VLAN 100
auto eth0.100
iface eth0.100 inet manual
	up ifconfig eth0.100 up

# KVM bridge, VLAN 100, via eth0
auto br100
iface br100 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1
	bridge_ports eth0.100
	bridge_maxwait 5
	bridge_fd 1
	bridge_stp on</pre>
<p>We must bring eth0 up before we can create eth0.100, and we must bring eth0.100 up before we can attach it to the bridge interface.  Finally, we must configure the host OS&#8217;s IP address on the bridge.  If you don&#8217;t want to attach virtual machines to VLAN 100, you could configure the IP directly on eth0.100 and leave out the stanza for br100.</p>
<p>Now, apply changes.  Because we&#8217;re going to move the existing IP from eth0 to br100, the easiest way is to reboot.  Alternatively, you may try <code>/etc/init.d/networking restart</code>, but make sure you run this from console so you can fix any problems.</p>
<p>Network interruption begins as soon as you run the above command, or reboot.  To restore access to the host OS, we must now configure the Ethernet port on the switch.  For Cisco, this is easy.  Assuming the server is connected to gigabit Ethernet port 1, run:</p>
<pre>configure terminal
interface GigabitEthernet0/1
 switchport mode trunk</pre>
<p>You should now be able to ping your server.  Once you verify that works, add the configuration for VLAN 200 to /etc/network/interfaces.</p>
<pre># VLAN 200
auto eth0.200
iface eth0.200 inet manual
	up ifconfig eth0.200 up

# KVM bridge, VLAN 200, via eth0
auto br200
iface br200 inet manual
	bridge_ports eth0.200
	bridge_maxwait 5
	bridge_fd 1
	bridge_stp on</pre>
<p>VLAN 200 doesn&#8217;t need an IP on the host OS, so it lacks the static IP configuration.  Configure any additional VLANs the same way.</p>
<p>Now we are ready to attach virtual machines to the new bridges.  For KVM, use virt-install to create a machine with 20 GB hard disk, 1 GB of RAM, booting the hardy iso, and attached to VLAN 100.</p>
<p><code>virt-install --connect qemu:///system -n guestname -r 1024 -f /path/to/virtual/disks/guestname.qcow2 -s 20 -c /path/to/isos/ubuntu-8.04.3-server-i386.iso --vnc --os-type linux --os-variant ubuntuHardy --accelerate --network=bridge:br100</code></p>
<p>Now use virt-manager to connect to the guest and configure it.</p>
<p>The last step can be replaced with any other virtualisation solution.  For instance, with Virtualbox, you can create a VM and then attach it to the bridged interface br100.</p>
<p><a href="http://www.tolaris.com/blog/wp-content/uploads/2010/02/virtualbox-br100.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2010/02/virtualbox-br100.png" alt="" title="virtualbox-br100" width="672" height="506" class="alignnone size-full wp-image-703" /></a></p>
<p>Unlike the Virtualbox <a href="http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/">NAT/routing setup</a>, we don&#8217;t need to enable IP forwarding (<code>sysctl -w net.ipv4.ip_forward=1</code>).  This method uses layer 2 switching only.  However, if you use an iptables firewall, make sure the FORWARD chain of the filter table defaults to &#8220;ACCEPT&#8221;, or use an equivalent rule matching traffic to/from the virtual bridges.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/02/20/vlans-bridges-and-virtual-machines/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Stopping spam botnets with fail2ban</title>
		<link>http://www.tolaris.com/2009/07/15/stopping-spam-botnets-with-fail2ban/</link>
		<comments>http://www.tolaris.com/2009/07/15/stopping-spam-botnets-with-fail2ban/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 19:26:26 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=432</guid>
		<description><![CDATA[In the last 3 weeks our company mail servers have been slammed with a massive increase in spam relay attempts. Logs showed many failures like so. Jul 12 14:15:26 mailserver.example.com postfix/smtpd[19885]: NOQUEUE: reject: RCPT from 206.12.0.10.in-addr.arpa[10.0.12.206]: 554 5.7.1 &#60;symons@yahoo.co.uk&#62;: Relay access denied; from=&#60;yyjaqveh@lpsb.com&#62; to=&#60;symons@yahoo.co.uk&#62; proto=ESMTP helo=&#60;206.12.0.10.in-addr.arpa&#62; IP addresses have been obscured to protect the guilty [...]]]></description>
			<content:encoded><![CDATA[<p>In the last 3 weeks our company mail servers have been slammed with a massive increase in spam relay attempts.  Logs showed many failures like so.</p>
<blockquote><p>Jul 12 14:15:26 mailserver.example.com postfix/smtpd[19885]: NOQUEUE: reject: RCPT from 206.12.0.10.in-addr.arpa[10.0.12.206]: 554 5.7.1 &lt;symons@yahoo.co.uk&gt;: Relay access denied; from=&lt;yyjaqveh@lpsb.com&gt; to=&lt;symons@yahoo.co.uk&gt; proto=ESMTP helo=&lt;206.12.0.10.in-addr.arpa&gt;</p></blockquote>
<p>IP addresses have been obscured to protect the guilty (or ignorant, as this is certainly a botnet).  Unfortunately, a large number of the IP addresses in question belonged to my own satellite customers.  Mail servers for our other domains were almost entirely unaffected.  Which tells me that some bastard has written a botnet spam client that looks up its own public IP, finds the reverse DNS entry, looks up the MX record of the corresponding domain, and then attempts to relay mail through that server.  This is particularly mean, as it will encourage your own ISP to shut you down.</p>
<p><span id="more-432"></span>I ignored these attempts at first.  The server was rejecting them and the botnet didn&#8217;t appear to be trying to relay through anyone else (according to traffic logs).  With our Postfix settings it was unlikely they&#8217;d ever succeed.  Then the log entries moved from &#8220;annoying&#8221; to &#8220;problematical&#8221;:</p>
<blockquote><p>Jul 13 20:34:50 mailserver.example.com postfix/master[18904]: warning: service &#8220;smtp&#8221; (25) has reached its process limit &#8220;200&#8243;: new clients may experience noticeable delays<br />
Jul 13 20:34:50 mailserver.example.com postfix/master[18904]: warning: to avoid this condition, increase the process count in master.cf or reduce the service time per client<br />
Jul 13 20:34:50 mailserver.example.com postfix/master[18904]: warning: see http://www.postfix.org/STRESS_README.html for examples of stress-adapting configuration settings</p></blockquote>
<p>Time to do something about it.  We already use <a href="http://www.fail2ban.org">fail2ban</a> to protect other services, so I enabled the postfix rules.  In /etc/fail2ban/jail.local:</p>
<pre>[postfix]
enabled  = true
ignoreip = 127.0.0.1/8   # suggest listing your valid server IP ranges here
port     = smtp,ssmtp
filter   = postfix
logpath  = /var/log/mail.log
bantime  = 3600</pre>
<p>I then reloaded fail2ban, and waited for results.  Within a few minutes (fail2ban takes time to parse existing logs), 65 IP addresses were banned.  Here are my results 24 hours later, edited for brevity:</p>
<p><code>root@mailserver:/etc/fail2ban# fail2ban-client status postfix</code></p>
<pre>Status for the jail: postfix
|- filter
|  |- File list:        /var/log/mail.log
|  |- Currently failed: 49
|  `- Total failed:     58171
`- action
   |- Currently banned: 68
   |  `- IP list: ...
   `- Total banned:     3883</pre>
<p>Now to hunt down the customers with botnet infections and start sending &#8220;violation of terms of service&#8221; warnings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/07/15/stopping-spam-botnets-with-fail2ban/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reverse-path filter part 2: OpenVPN and traceroute</title>
		<link>http://www.tolaris.com/2009/07/14/reverse-path-filter-part-2-openvpn/</link>
		<comments>http://www.tolaris.com/2009/07/14/reverse-path-filter-part-2-openvpn/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 21:59:53 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[openvpn]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=416</guid>
		<description><![CDATA[After my recent adventure with reverse-path filtering, I didn&#8217;t expect to see it again so soon. And then I took another look at a long-standing annoyance in our OpenVPN network. I set up OpenVPN so our offices and laptops could securely access internal resources. This lets me print documents directly to another office, for instance. [...]]]></description>
			<content:encoded><![CDATA[<p>After my <a href="/2009/07/13/disabling-reverse-path-filtering-in-complex-networks/">recent adventure</a> with reverse-path filtering, I didn&#8217;t expect to see it again so soon.  And then I took another look at a long-standing annoyance in our OpenVPN network.</p>
<p>I set up <a href="http://www.openvpn.net">OpenVPN</a> so our offices and laptops could securely access internal resources.  This lets me print documents directly to another office, for instance.  Or access web-based applications that we don&#8217;t make available to the public.  Or remotely SSH into a PC and fix a problem.  <span id="more-416"></span>A month after setting it up, I realised that:</p>
<ol>
<li>I could traceroute from a host on the LAN to a host on another office LAN, via the VPN</li>
<li>I could traceroute from a host on the LAN to a host in the Internet, where the traffic never enters the VPN</li>
<li>I could <strong>not</strong> traceroute from a host on the LAN, through the VPN to the central VPN server, and from there to a server on the public Internet</li>
</ol>
<p>Why would I want to do #3?  Because I sometimes deal with ISPs and autocratic governments that filter Internet traffic.  In those circumstances, I back-haul all my traffic to the VPN server and break out there, bypassing any <a href="/proxy.emirates.net.ae/">annoying proxies</a>.</p>
<p>How I do it is a story for another day.  Suffice it to say that much complicated NAT trickery and careful routing is involved.</p>
<p>So, #1 (through the VPN to the VPN server, and again to another office) is good:</p>
<p><code>tyler@baal:~$ sudo traceroute -n -I 192.168.6.50</code></p>
<pre>traceroute to 192.168.6.50 (192.168.6.50), 30 hops max, 40 byte packets
 1  192.168.3.1  1.596 ms  2.905 ms  3.394 ms
 2  10.1.0.1  21.868 ms  26.078 ms  27.751 ms
 3  10.1.0.10  162.386 ms  166.004 ms  168.540 ms
 4  192.168.6.50  171.394 ms  175.397 ms  181.904 ms</pre>
<p>And #2 (avoiding the VPN entirely) is good:</p>
<p><code>tyler@baal:~$ sudo traceroute -n -I google.com</code></p>
<pre>traceroute to google.com (74.125.45.100), 30 hops max, 40 byte packets
 1  192.168.3.1  1.718 ms  3.435 ms  4.546 ms
 2  10.1.110.1  12.975 ms  16.903 ms  17.462 ms
 ...
16  74.125.45.100  114.961 ms  110.625 ms  112.908 ms</pre>
<p>But #3 (through the VPN to the VPN server) gives no joy.  If I change my router&#8217;s VPN setup to route all traffic through the VPN (or create a  specific route for Google), I see:</p>
<p><code>tyler@baal:~$ sudo traceroute -n -I google.com</code></p>
<pre>traceroute to google.com (74.125.45.100), 30 hops max, 40 byte packets
 1  192.168.3.1  1.618 ms  2.005 ms  3.704 ms
 2  10.1.0.1  21.889 ms  29.736 ms  30.924 ms
 3  172.16.64.17  33.234 ms  35.010 ms  37.247 ms
 4  * * *
 5  * * *
 ...
15  * * *
16  74.125.45.100  126.346 ms  114.346 ms  114.358 ms</pre>
<p>So I can ping it, and the final step in the trace shows the answer, but no routers between the VPN server and Google appear.</p>
<p>Or does it?  A little sniffing at my router showed something interesting:</p>
<p><code>root@router:~# tshark -i tun0 -f 'icmp[icmptype] = icmp-timxceed'</code></p>
<pre>0.000079 192.168.3.1 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
0.020700 10.1.0.1 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
...
0.076001 146.188.15.237 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
0.107338 146.188.69.102 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)</pre>
<p>So the traffic is coming in the VPN tunnel.  But what is going out?</p>
<p><code>root@router:~# tshark -i eth1 -f 'icmp[icmptype] = icmp-timxceed'</code></p>
<pre>
0.000083 192.168.3.1 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
0.021200 10.1.0.1 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
0.024700 172.16.64.17 -> 192.168.3.10 ICMP Time-to-live exceeded (Time to live exceeded in transit)
...</pre>
<p>I could see the initial &#8220;TTL expired&#8221; messages from the first few hops, but none after that.  Something is stopping them between tun0 (the OpenVPN tun interface) and eth1 (the inside LAN interface).</p>
<p>Can you see where I&#8217;m going with this?  It&#8217;s our old friend, the reverse-path filter.  Disable it with sysctl or echo.</p>
<p><code>echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter</code></p>
<p>For some reason, the kernel doesn&#8217;t mind most traffic moving between eth1 and tun0, but something about the ICMP &#8220;TTL expired&#8221; messages triggered rp_filter.  Disable it and traceroute works again.</p>
<p>Aside: I always use <a href="http://www.bitwizard.nl/mtr/">mtr</a> in place of regular traceroute.  What traceroute does in O(n), mtr does in O(1).  Actually O(n/5), but explaining that needs it own post.  mtr is fast.  You should use mtr.  Your distro has it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/07/14/reverse-path-filter-part-2-openvpn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disabling reverse-path filtering in complex networks</title>
		<link>http://www.tolaris.com/2009/07/13/disabling-reverse-path-filtering-in-complex-networks/</link>
		<comments>http://www.tolaris.com/2009/07/13/disabling-reverse-path-filtering-in-complex-networks/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:25:35 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=400</guid>
		<description><![CDATA[I recently created a very complex network using routers running Ubuntu Hardy. These routers were configured with the following features: failover shared IP addresses using heartbeat routing announcements via Quagga BGPd 802.1q VLAN tagging multiple physical interfaces During debugging of this network, I encountered an odd scenario whereby traffic coming in from the external interface [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created a very complex network using routers running Ubuntu Hardy.  These routers were configured with the following features:</p>
<ul>
<li>failover shared IP addresses using <a href="http://www.linux-ha.org/Heartbeat">heartbeat</a></li>
<li>routing announcements via <a href="http://www.quagga.net/">Quagga</a> BGPd</li>
<li>802.1q <a href="https://wiki.ubuntu.com/vlan">VLAN</a> tagging</li>
<li>multiple physical interfaces</li>
</ul>
<p>During debugging of this network, I encountered an odd scenario whereby traffic coming in from the external interface (eth0) could not reach the IP address of the secondary (inactive) router&#8217;s internal interface (eth1, VLAN tagged).</p>
<p><img src="http://www.tolaris.com/blog/wp-content/uploads/2009/07/dual-routers.png" alt="dual-routers" title="dual-routers" width="730" height="290" class="alignnone size-full wp-image-402" /></p>
<p><span id="more-400"></span>When router B is inactive, it is available on IP addresses on both eth0 and one VLAN of eth1.  Because it is inactive, traffic bound for an IP on router B eth1 moves in a big clock-wise circle around the above diagram.  It comes from outside to router A eth0, exits router A via eth1, moves to the internal switch, then back to router B eth1.  When active, traffic comes directly to it from outside, and instead router A behaves this way.  The problem is that when in the inactive state, the inactive router&#8217;s return traffic goes directly out eth0.  That is, it comes in eth1 and goes back out eth0.</p>
<p>When such a situation occurs (source and destination traffic to the same IP using different interfaces), the Linux kernel (by default in Debian/Ubuntu) drops the traffic as potentially spoofed.  This is called <a href="http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.kernel.rpf.html">reverse-path filtering</a>, and it is useful for preventing obviously bad traffic from entering your network (sourced from a local IP address, multicast, etc).  However, you can safely disable it if you perform the same sanity checks in your iptables firewall (and you do, right?).</p>
<p>To disable this check, use the net.ipv4.conf.all.arp_filter sysctl variable:</p>
<p><code>root@routera:~# sysctl -a | grep \\.rp_filter</code></p>
<pre>net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.eth1.rp_filter = 1
net.ipv4.conf.eth1/10.rp_filter = 1
net.ipv4.conf.eth1/20.rp_filter = 1</pre>
<p>In this example, my router has two physical interfaces, eth0 and eth1, and has two tagged VLANs on eth1 (VLANs 10 and 20).  All are set to perform basic reverse-path filtering.  Change them by editing /etc/sysctl.conf.  Find this section:</p>
<pre># Comment the next two lines to disable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1</pre>
<p>Comment-out the two lines here, and apply changes with <code>sysctl -p</code>.  If any interfaces still show rp_filter=1, reboot or set them to zero yourself:</p>
<p><code>sysctl -w net.ipv4.conf.eth0.rp_filter=0</code></p>
<p>This problem with rp_filter seems to specifically cause issues with VLAN interfaces.  I have another pair of routers doing the same thing, except they don&#8217;t use VLAN tagging on eth1.  They have no issues with rp_filter at all.</p>
<p>If you suspect your traffic is being filtered by rp_filter, you can find out with log_martians:</p>
<p><code>sysctl -w net.ipv4.conf.all.log_martians=1</code></p>
<p>Your syslog will now show dropped packets.</p>
<p>Note that the value of rp_filter is not <a href="http://lists.netfilter.org/pipermail/netfilter/2000-September/005400.html">what you may expect</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/07/13/disabling-reverse-path-filtering-in-complex-networks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using host networking and NAT with VirtualBox</title>
		<link>http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/</link>
		<comments>http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 17:03:56 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=237</guid>
		<description><![CDATA[I use VirtualBox every day. The satellite world is infested with bad Windows-based management tools that fail to run in Wine. So I often run those apps in a Windows virtual machine, safely sandboxed the way Windows belongs. Note to hardware developers: if your network-based device does not have a standards-compliant HTTP interface, you lose. [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.virtualbox.org/">VirtualBox</a> every day.  The satellite world is <em>infested</em> with bad Windows-based management tools that fail to run in <a href="http://www.winehq.org/">Wine</a>.  So I often run those apps in a Windows virtual machine, safely sandboxed the way Windows belongs.</p>
<p>Note to hardware developers: if your network-based device does not have a standards-compliant HTTP interface, you lose.  If it has a Windows-based management tool instead, you lose <em>twice</em>. I will buy your product only if I have no other choice.</p>
<p>I imagine running Windows apps is what 90% of VirtualBox users use it for, but it can do so much more than that.  I also run several Linux-based VMs, and use them to test server configs, or even whole networks before rolling out the real thing.  If you do this, you probably want to use more than the basic NAT networking that VirtualBox uses by default.  For instance, wouldn&#8217;t it be nice to install an SSH server in the VM, minimise the VirtualBox GUI, and SSH in from a terminal just like you would a real server?</p>
<p><span id="more-237"></span>I assume you are using VirtualBox 2.1.4 from a Linux host running Ubuntu 8.04 &#8220;Hardy Heron&#8221;.  Similar commands can be used on any recent Debian or Ubuntu release.  You&#8217;ll have to adapt some things to use it on RPM- or source-based Linux distributions.  Assume all commands are run as root (directly or with sudo).</p>
<p><em>Update 2010-08-18: These instructions are still valid as of VirtualBox 3.2.8 and Ubuntu 10.04 &#8220;Lucid Lynx&#8221;.  VirtualBox now creates a &#8220;vboxnet0&#8243; interface by default, but this is not a bridge.  Follow the instructions below.</em></p>
<p><strong>Step 1: Create a bridge interface</strong></p>
<p>First, we have to create a bridge interface for the VMs.  Install the bridge utilities:<br />
<code>apt-get install bridge-utils</code></p>
<p>Now make the bridge start on boot.  Add the following to /etc/network/interfaces:</p>
<pre># VirtualBox NAT bridge
auto vnet0
iface vnet0 inet static
        address 172.16.0.1
        netmask 255.255.255.0
        bridge_ports none
        bridge_maxwait 0
        bridge_fd 1
        up iptables -t nat -I POSTROUTING -s 172.16.0.0/24 -j MASQUERADE
        down iptables -t nat -D POSTROUTING -s 172.16.0.0/24 -j MASQUERADE</pre>
<p>Either reboot or start it manually:<br />
<code>ifup vnet0</code></p>
<p>We now have a bridge interface to which VirtualBox can attach virtual machines.  That traffic will be NATed to your host&#8217;s IP address when the guest OS accesses the Internet.  However, the traffic won&#8217;t yet route.</p>
<p>Note: if you are already using a firewall such as iptables, shorewall, or ufw, you should remove the two iptables lines above and add equivalent commands to your firewall configuration.  Otherwise NAT will probably not function.</p>
<p><strong>Step 2: Enable IP forwarding</strong></p>
<p>Now you must tell the kernel to route traffic.  Find the &#8216;net.ipv4.ip_forward&#8217; line in /etc/sysctl.conf, and uncomment it:</p>
<pre># Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1</pre>
<p>And load it:<br />
<code>sysctl -p</code></p>
<p><strong>Step 3: Setup DHCP and DNS for clients</strong></p>
<p>OK, now you can forward and NAT traffic from client VMs.  But you still have to configure static IPs in each guest&#8217;s OS.  Here is where DNSMasq shines.  It provides an all-in-one DHCP/DNS server in a small footprint.  Install it:<br />
<code>apt-get install dnsmasq</code></p>
<p>And edit /etc/dnsmasq.conf to include:</p>
<pre>interface=vnet0
dhcp-range=172.16.0.2,172.16.0.254,1h</pre>
<p>That&#8217;s all you really need, but you may want to explicitly define DNS servers and domains for the guests, or static assignments.  Add:</p>
<pre>dhcp-option=option:dns-server,172.16.0.1,208.67.222.222,208.67.220.220
dhcp-option=option:domain-name,example.com
dhcp-host=08:00:27:00:00:02,vmxp,172.16.0.2       # Windows XP
dhcp-host=08:00:27:00:00:03,vmubuntu,172.16.0.3   # Ubuntu</pre>
<p>This defines the host OS and the OpenDNS servers as the DNS servers (instead of passing on whatever your host OS uses), tells all guests they are part of the domain example.com, and defines two static assignments by MAC address.  </p>
<p><strong>Step 4: Set up the virtual machine</strong></p>
<ol>
<li>Start the VirtualBox interface, and edit your virtual machine&#8217;s settings.</li>
<li>Choose &#8220;Network&#8221;.</li>
<li>Enable a network adaptor.</li>
<li>Under &#8220;Attached to:&#8221;, select &#8220;Host Interface&#8221;.</li>
<li>If you assigned a static DHCP assignment above, be sure to set the same MAC address.</li>
<li>Under &#8220;Host Interfaces&#8221;, select the bridge you created in step 1, vnet0.</li>
</ol>
<p>Example:<br />
<img src="http://www.tolaris.com/blog/wp-content/uploads/2009/03/vm-network-settings.png" alt="vm-network-settings" title="vm-network-settings" width="774" height="621" class="alignnone size-full wp-image-240" /></p>
<p>Your virtual machines will now automatically receive an IP address in the 172.16.0.0/24 network, will resolve DNS, will NAT to your host&#8217;s external IP address, and can directly address each other.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
	</channel>
</rss>

