<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SSLSniff on System Overlord</title><link>https://systemoverlord.com/tags/sslsniff.html</link><description>Recent content in SSLSniff on System Overlord</description><generator>Hugo</generator><language>en-us</language><managingEditor>david@systemoverlord.com (David Tomaschik)</managingEditor><webMaster>david@systemoverlord.com (David Tomaschik)</webMaster><lastBuildDate>Sun, 11 Nov 2012 02:47:43 +0000</lastBuildDate><atom:link href="https://systemoverlord.com/tags/sslsniff/index.xml" rel="self" type="application/rss+xml"/><item><title>MITM on KVM Guests</title><link>https://systemoverlord.com/2012/11/11/mitm-on-kvm-guests/</link><pubDate>Sun, 11 Nov 2012 02:47:43 +0000</pubDate><author>david@systemoverlord.com (David Tomaschik)</author><guid>https://systemoverlord.com/2012/11/11/mitm-on-kvm-guests/</guid><description>&lt;p&gt;I run a KVM virtualization system as part of my test lab.  I often want to redirect traffic to an intermediate application (such as sslsniff) on the host.  Supposing I have a guest on interface vnet7, bridged to br10, with the host running on 192.168.1.10 the following ebtables &amp;amp; iptables magic gets the job done:&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="text geshifilter-text" style="font-family:monospace;"&gt;
&lt;pre style="font-family: monospace; font-weight: normal; font-style: normal"&gt;ebtables -t broute -A BROUTING -p IPv4 -i vnet7 --ip-proto tcp --ip-dport 443 -j redirect --redirect-target DROP
iptables -t nat -A PREROUTING -i vnet7 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.10:9999&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that you can't use -j REDIRECT, as that's (roughly) equivalent to DNAT to the IP of the incoming interface, but bridged virtual network interfaces (vnet7) have no IP address.&lt;/p&gt;</description></item></channel></rss>