<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fixme.ch/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tengu</id>
		<title>Fixme.ch - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://fixme.ch/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tengu"/>
		<link rel="alternate" type="text/html" href="http://fixme.ch/wiki/Special:Contributions/Tengu"/>
		<updated>2026-08-10T11:51:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>http://fixme.ch/w/index.php?title=31C3/laptop_preparation&amp;diff=6116</id>
		<title>31C3/laptop preparation</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=31C3/laptop_preparation&amp;diff=6116"/>
				<updated>2014-11-01T16:06:58Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* Firefox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Laptop preparation ==&lt;br /&gt;
Goal is easy: prevent unauthorized accesses to your laptop while still being able to access resources. Oh, and, ensure resources aren't faked or messed up by some rogue proxy.&lt;br /&gt;
&lt;br /&gt;
It's mainly based on [https://events.ccc.de/congress/2014/wiki/Static:How_To_Survive CCC Survival Guide ]. It's a (very) good start to follow their advices, especially regarding physical protection ;).&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
The proposed setup is based on two Onion Routers&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Onion_routing Wikipedia: Onion Routing]&amp;lt;/ref&amp;gt;: i2p&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/I2P Wikipedia: i2p]&amp;lt;/ref&amp;gt; and Tor&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Tor_%28anonymity_network%29 Wikipedia: Tor]&amp;lt;/ref&amp;gt;. The first one is optional, but it's always cool having some new stuff in order to try them. Well, new… i2p is 11 years old now ;).&lt;br /&gt;
&lt;br /&gt;
All is based on Debian Sid, but most of the packages are present on Arch, Ubuntu, Gentoo and so on.&lt;br /&gt;
&lt;br /&gt;
==== Tor ====&lt;br /&gt;
&lt;br /&gt;
===== Get package =====&lt;br /&gt;
First, install Tor. On Debian, we can use Torporject sources in order to get the latest official releases:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;deb http://deb.torproject.org/torproject.org &amp;lt;DISTRIBUTION&amp;gt; main&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can get the distribution code with this command: &amp;lt;code&amp;gt;lsb_release -c&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You will also need the GPG key in order to be able to validate packages:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
gpg --keyserver keys.gnupg.net --recv 886DDD89&lt;br /&gt;
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, &amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install deb.torproject.org-keyring &amp;amp;&amp;amp; sudo apt-get install tor&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Configuration =====&lt;br /&gt;
Now we have the package and related daemon, we have to configure it a bit. As the main aim of this setup is to make all the traffic through Tor, here are the settings you'll need. You may empty the file and copy&amp;amp;paste this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Create SOCKS port, and ensure we isolate streams&lt;br /&gt;
SocksPort 9050 IsolateDestAddr IsolateDestPort&lt;br /&gt;
SafeSocks 0&lt;br /&gt;
TestSocks 1&lt;br /&gt;
# This port will be used for &amp;quot;non-socks&amp;quot; connection. I.e. for&lt;br /&gt;
# stupid apps which just don't know what a SOCKS is&lt;br /&gt;
TransPort 9040&lt;br /&gt;
TransListenAddress 127.0.0.1&lt;br /&gt;
# Create a listener for DNS queries.&lt;br /&gt;
DNSPort 5400&lt;br /&gt;
DNSListenAddress 127.0.0.1&lt;br /&gt;
NumCPUs 1&lt;br /&gt;
VirtualAddrNetwork 10.192.0.0/10&lt;br /&gt;
AvoidDiskWrites 1&lt;br /&gt;
AutomapHostsOnResolve 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments should be enough, but you might want to read some more documentation about [https://www.torproject.org/docs/tor-manual.html.en the tor configuration file].&lt;br /&gt;
&lt;br /&gt;
Restart Tor with &amp;lt;code&amp;gt;sudo service tor restart&amp;lt;/code&amp;gt;, and we're done :).&lt;br /&gt;
&lt;br /&gt;
==== i2p ====&lt;br /&gt;
As said, this step is optional. But anyway, it's cool. And even easier in fact.&lt;br /&gt;
&lt;br /&gt;
===== Get package =====&lt;br /&gt;
Add the following source to your Debian system:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;deb http://deb.i2p2.no/ unstable main&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Import the following key for package signature: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;wget https://geti2p.net/_static/debian-repo.pub -O - | sudo apt-key add -&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install required packages: &amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install i2p i2p-keyring&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;/etc/default/i2p&amp;lt;/code&amp;gt; file in order to enable the daemon. Start it with &amp;lt;code&amp;gt;sudo service i2p start&amp;lt;/code&amp;gt;, and… well, that's all ;).&lt;br /&gt;
&lt;br /&gt;
More information available [https://geti2p.net/en/download/debian#debian here].&lt;br /&gt;
&lt;br /&gt;
==== IPTables ====&lt;br /&gt;
Now we hit the game: we might as well kill our connection capabilities, or make some great things. After all, that's IPTables&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Iptables Wikipedia: iptables]&amp;lt;/ref&amp;gt; ;)&lt;br /&gt;
&lt;br /&gt;
There are multiple goals with the proposed configuration:&lt;br /&gt;
# lock out the intruders&lt;br /&gt;
# force outgoing traffic through Tor by default&lt;br /&gt;
# allow &amp;quot;smart&amp;quot; application to connect by them-selves to the SOCKS or Transproxy&lt;br /&gt;
# allow i2p to go out freely&lt;br /&gt;
# allow Tor to go out freely&lt;br /&gt;
&lt;br /&gt;
More over, we want this policy to be enforced as soon as we get network. In order to do so, we will need an &amp;quot;iptables-restore&amp;quot; call, and a script/configuration to feed it.&lt;br /&gt;
&lt;br /&gt;
The following content is to be put in /etc/network/iptables file (or something like that, you'll have to create the file anyway). We will explain bellow how it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT DROP [1:264]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT DROP [60:12415]&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A INPUT -p icmp -j ACCEPT&lt;br /&gt;
-A INPUT -i vboxnet0 -j ACCEPT&lt;br /&gt;
-A INPUT -j LOG --log-prefix &amp;quot;INPUT DROP &amp;quot;&lt;br /&gt;
&lt;br /&gt;
-A OUTPUT -o lo -j ACCEPT&lt;br /&gt;
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -p tcp -m owner --uid-owner debian-tor -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -m owner --uid-owner i2psvc -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p udp -m udp --dport 5400 -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 9050 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 9040 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -s 127.0.0.1/32 -p tcp -m tcp --dport 631 -j ACCEPT&lt;br /&gt;
-A OUTPUT -p icmp --icmp-type 8 -j ACCEPT&lt;br /&gt;
-A OUTPUT -j LOG --log-prefix &amp;quot;OUTPUT DROP &amp;quot;&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
*nat&lt;br /&gt;
:INPUT DROP [524:86738]&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [637739:421546290]&lt;br /&gt;
-A OUTPUT -m owner --uid-owner debian-tor -j RETURN&lt;br /&gt;
-A OUTPUT -m owner --uid-owner i2psvc -j RETURN&lt;br /&gt;
-A OUTPUT -p udp -m udp --dport 53 -j REDIRECT --to-ports 5400&lt;br /&gt;
-A OUTPUT  -p udp -m udp --dport 123 -j REDIRECT --to-ports 123&lt;br /&gt;
-A OUTPUT ! -o lo -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040&lt;br /&gt;
-A OUTPUT -j LOG --log-prefix &amp;quot;OUTPUT nat DROP &amp;quot;&lt;br /&gt;
-A INPUT -j LOG --log-prefix &amp;quot;INPUT nat DROP &amp;quot;&lt;br /&gt;
COMMIT&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So. How does it work? Pretty easy in the end: with iptables, we can filter packets by user ID, i.e. iptables knows &amp;quot;who&amp;quot; sends the packet it's filtering. As bot Tor and i2p daemon have dedicated users, we can tell iptables to let those two guys connections, while forcing the others through Tor. Or whatever you want, in fact.&lt;br /&gt;
&lt;br /&gt;
The filter table (block starting with the *filter) will manage the IN and OUT, allowing only i2p and tor traffic out, while allowing related traffic in. It will force non-i2p/tor traffic to go through Tor TransPort we defined earlier, and it will also redirect DNS queries to Tor in order to avoid DNS poisoning.&lt;br /&gt;
&lt;br /&gt;
The nat table (block starting with *nat) will do the redirects.&lt;br /&gt;
&lt;br /&gt;
In order to enforce that, you'll need to edit your &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; file and add the following line in your eth0/wlan0 definitions: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;post-up iptables-restore /etc/network/iptables&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Firefox ====&lt;br /&gt;
Firefox is smart. It can speak &amp;quot;SOCKS&amp;quot;. Hence, we can make it speak both i2p and Tor. At the same time. But that's not all: we will also install a specific profile in order to ensure we don't leak too much data. For that, we will use the firefox profile proposed by JonDonym&amp;lt;ref&amp;gt;[https://anonymous-proxy-servers.net/ JonDonym ]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It will avoid some bad behavior of Firefox, cover up our traces and avoid a too precise match with our browser. You might want to try the well-known [https://panopticlick.eff.org/ Panopticlick] proposed by the EFF in a &amp;quot;before/after&amp;quot; mode ;).&lt;br /&gt;
&lt;br /&gt;
Also, we will use a very old standard: Proxy auto-config, also known as PAC file&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Proxy_auto-config Wikipedia: Proxy auto-config]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== JonDonym =====&lt;br /&gt;
As said, we will install a special profile. In order to do so, simply follow the steps as described [https://anonymous-proxy-servers.net/en/help/firststeps.html here]. Beware, JonDo is another thing, and proposes some proxies we don't need for the current setup. Follow the steps for the &amp;quot;JonDoFox&amp;quot; installation.&lt;br /&gt;
&lt;br /&gt;
Once this is done, start Firefox and check if you have the JonDonym profile ­— you will know pretty soon if you have it or not ;).&lt;br /&gt;
&lt;br /&gt;
===== PAC =====&lt;br /&gt;
The PAC file is, in fact, a simple Javascript… err… script. It provides some nice features, allows you to tell Firefox (or any browser supporting this file type) how it should handle a request.&lt;br /&gt;
&lt;br /&gt;
The script content looks like that:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
function FindProxyForURL(url, host) {&lt;br /&gt;
  var lhost = host.toLowerCase();&lt;br /&gt;
  host = lhost;&lt;br /&gt;
  tor = 'SOCKS5 localhost:9050';&lt;br /&gt;
  i2p_ssl = 'PROXY localhost:4445';&lt;br /&gt;
  i2p_clear = 'PROXY localhost:4444';&lt;br /&gt;
&lt;br /&gt;
  if (shExpMatch(host, &amp;quot;*.onion&amp;quot;)) {&lt;br /&gt;
    alert(&amp;quot;Tor hidden service&amp;quot;);&lt;br /&gt;
    return tor;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  if (shExpMatch(url, &amp;quot;https&amp;quot;)) {&lt;br /&gt;
    if (shExpMatch(host, &amp;quot;*.i2p&amp;quot;)) {&lt;br /&gt;
      alert(&amp;quot;i2p SSL&amp;quot;);&lt;br /&gt;
      return i2p_ssl;&lt;br /&gt;
    }&lt;br /&gt;
  } else {&lt;br /&gt;
    if (shExpMatch(host, &amp;quot;*.i2p&amp;quot;)) {&lt;br /&gt;
      alert(&amp;quot;i2p CLEAR&amp;quot;);&lt;br /&gt;
      return i2p_clear;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  alert(&amp;quot;No match at all for &amp;quot;+url);&lt;br /&gt;
&lt;br /&gt;
  return tor;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such easiness. Such love. Such nice.&lt;br /&gt;
&lt;br /&gt;
It:&lt;br /&gt;
# checks if the hostname maches &amp;quot;.onion&amp;quot;&lt;br /&gt;
## if it matches &amp;quot;.onion&amp;quot;, it redirects to the Tor SOCKS port&lt;br /&gt;
# checks if we're using HTTPS&lt;br /&gt;
## if it matches &amp;quot;.i2p&amp;quot;, redirect to the HTTPS i2p proxy&lt;br /&gt;
# If we're &amp;quot;in the clear&amp;quot; (HTTP) and match &amp;quot;.i2p&amp;quot;, redirect to the HTTP i2p proxy&lt;br /&gt;
# if it matches nothing, it redirects to Tor anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might save this file in something like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;~/.mozilla/rules.pac&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and load it in Firefox using Preferences -&amp;gt; Advanced -&amp;gt; Network -&amp;gt; Settings and point to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;file:///home/&amp;lt;user&amp;gt;/.mozilla/rules.pac&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You might want to check how it goes using the Browser Console (ctrl+shift+j or Developers -&amp;gt; Web Console).&lt;br /&gt;
&lt;br /&gt;
=== Physical ===&lt;br /&gt;
Feel free to add stuff ;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=31C3/laptop_preparation&amp;diff=6114</id>
		<title>31C3/laptop preparation</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=31C3/laptop_preparation&amp;diff=6114"/>
				<updated>2014-11-01T15:40:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: First draft, not finished.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Laptop preparation ==&lt;br /&gt;
Goal is easy: prevent unauthorized accesses to your laptop while still being able to access resources. Oh, and, ensure resources aren't faked or messed up by some rogue proxy.&lt;br /&gt;
&lt;br /&gt;
It's mainly based on [https://events.ccc.de/congress/2014/wiki/Static:How_To_Survive CCC Survival Guide ]. It's a (very) good start to follow their advices, especially regarding physical protection ;).&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
The proposed setup is based on two Onion Routers&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Onion_routing Wikipedia: Onion Routing]&amp;lt;/ref&amp;gt;: i2p&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/I2P Wikipedia: i2p]&amp;lt;/ref&amp;gt; and Tor&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Tor_%28anonymity_network%29 Wikipedia: Tor]&amp;lt;/ref&amp;gt;. The first one is optional, but it's always cool having some new stuff in order to try them. Well, new… i2p is 11 years old now ;).&lt;br /&gt;
&lt;br /&gt;
All is based on Debian Sid, but most of the packages are present on Arch, Ubuntu, Gentoo and so on.&lt;br /&gt;
&lt;br /&gt;
==== Tor ====&lt;br /&gt;
&lt;br /&gt;
===== Get package =====&lt;br /&gt;
First, install Tor. On Debian, we can use Torporject sources in order to get the latest official releases:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;deb http://deb.torproject.org/torproject.org &amp;lt;DISTRIBUTION&amp;gt; main&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can get the distribution code with this command: &amp;lt;code&amp;gt;lsb_release -c&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You will also need the GPG key in order to be able to validate packages:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
gpg --keyserver keys.gnupg.net --recv 886DDD89&lt;br /&gt;
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, &amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install deb.torproject.org-keyring &amp;amp;&amp;amp; sudo apt-get install tor&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Configuration =====&lt;br /&gt;
Now we have the package and related daemon, we have to configure it a bit. As the main aim of this setup is to make all the traffic through Tor, here are the settings you'll need. You may empty the file and copy&amp;amp;paste this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Create SOCKS port, and ensure we isolate streams&lt;br /&gt;
SocksPort 9050 IsolateDestAddr IsolateDestPort&lt;br /&gt;
SafeSocks 0&lt;br /&gt;
TestSocks 1&lt;br /&gt;
# This port will be used for &amp;quot;non-socks&amp;quot; connection. I.e. for&lt;br /&gt;
# stupid apps which just don't know what a SOCKS is&lt;br /&gt;
TransPort 9040&lt;br /&gt;
TransListenAddress 127.0.0.1&lt;br /&gt;
# Create a listener for DNS queries.&lt;br /&gt;
DNSPort 5400&lt;br /&gt;
DNSListenAddress 127.0.0.1&lt;br /&gt;
NumCPUs 1&lt;br /&gt;
VirtualAddrNetwork 10.192.0.0/10&lt;br /&gt;
AvoidDiskWrites 1&lt;br /&gt;
AutomapHostsOnResolve 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments should be enough, but you might want to read some more documentation about [https://www.torproject.org/docs/tor-manual.html.en the tor configuration file].&lt;br /&gt;
&lt;br /&gt;
Restart Tor with &amp;lt;code&amp;gt;sudo service tor restart&amp;lt;/code&amp;gt;, and we're done :).&lt;br /&gt;
&lt;br /&gt;
==== i2p ====&lt;br /&gt;
As said, this step is optional. But anyway, it's cool. And even easier in fact.&lt;br /&gt;
&lt;br /&gt;
===== Get package =====&lt;br /&gt;
Add the following source to your Debian system:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;deb http://deb.i2p2.no/ unstable main&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Import the following key for package signature: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;wget https://geti2p.net/_static/debian-repo.pub -O - | sudo apt-key add -&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install required packages: &amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install i2p i2p-keyring&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;/etc/default/i2p&amp;lt;/code&amp;gt; file in order to enable the daemon. Start it with &amp;lt;code&amp;gt;sudo service i2p start&amp;lt;/code&amp;gt;, and… well, that's all ;).&lt;br /&gt;
&lt;br /&gt;
More information available [https://geti2p.net/en/download/debian#debian here].&lt;br /&gt;
&lt;br /&gt;
==== IPTables ====&lt;br /&gt;
Now we hit the game: we might as well kill our connection capabilities, or make some great things. After all, that's IPTables&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Iptables Wikipedia: iptables]&amp;lt;/ref&amp;gt; ;)&lt;br /&gt;
&lt;br /&gt;
There are multiple goals with the proposed configuration:&lt;br /&gt;
# lock out the intruders&lt;br /&gt;
# force outgoing traffic through Tor by default&lt;br /&gt;
# allow &amp;quot;smart&amp;quot; application to connect by them-selves to the SOCKS or Transproxy&lt;br /&gt;
# allow i2p to go out freely&lt;br /&gt;
# allow Tor to go out freely&lt;br /&gt;
&lt;br /&gt;
More over, we want this policy to be enforced as soon as we get network. In order to do so, we will need an &amp;quot;iptables-restore&amp;quot; call, and a script/configuration to feed it.&lt;br /&gt;
&lt;br /&gt;
The following content is to be put in /etc/network/iptables file (or something like that, you'll have to create the file anyway). We will explain bellow how it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT DROP [1:264]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT DROP [60:12415]&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A INPUT -p icmp -j ACCEPT&lt;br /&gt;
-A INPUT -i vboxnet0 -j ACCEPT&lt;br /&gt;
-A INPUT -j LOG --log-prefix &amp;quot;INPUT DROP &amp;quot;&lt;br /&gt;
&lt;br /&gt;
-A OUTPUT -o lo -j ACCEPT&lt;br /&gt;
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -p tcp -m owner --uid-owner debian-tor -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -m owner --uid-owner i2psvc -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p udp -m udp --dport 5400 -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 9050 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 9040 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT&lt;br /&gt;
-A OUTPUT -d 127.0.0.1/32 -s 127.0.0.1/32 -p tcp -m tcp --dport 631 -j ACCEPT&lt;br /&gt;
-A OUTPUT -p icmp --icmp-type 8 -j ACCEPT&lt;br /&gt;
-A OUTPUT -j LOG --log-prefix &amp;quot;OUTPUT DROP &amp;quot;&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
*nat&lt;br /&gt;
:INPUT DROP [524:86738]&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [637739:421546290]&lt;br /&gt;
-A OUTPUT -m owner --uid-owner debian-tor -j RETURN&lt;br /&gt;
-A OUTPUT -m owner --uid-owner i2psvc -j RETURN&lt;br /&gt;
-A OUTPUT -p udp -m udp --dport 53 -j REDIRECT --to-ports 5400&lt;br /&gt;
-A OUTPUT  -p udp -m udp --dport 123 -j REDIRECT --to-ports 123&lt;br /&gt;
-A OUTPUT ! -o lo -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040&lt;br /&gt;
-A OUTPUT -j LOG --log-prefix &amp;quot;OUTPUT nat DROP &amp;quot;&lt;br /&gt;
-A INPUT -j LOG --log-prefix &amp;quot;INPUT nat DROP &amp;quot;&lt;br /&gt;
COMMIT&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So. How does it work? Pretty easy in the end: with iptables, we can filter packets by user ID, i.e. iptables knows &amp;quot;who&amp;quot; sends the packet it's filtering. As bot Tor and i2p daemon have dedicated users, we can tell iptables to let those two guys connections, while forcing the others through Tor. Or whatever you want, in fact.&lt;br /&gt;
&lt;br /&gt;
The filter table (block starting with the *filter) will manage the IN and OUT, allowing only i2p and tor traffic out, while allowing related traffic in. It will force non-i2p/tor traffic to go through Tor TransPort we defined earlier, and it will also redirect DNS queries to Tor in order to avoid DNS poisoning.&lt;br /&gt;
&lt;br /&gt;
The nat table (block starting with *nat) will do the redirects.&lt;br /&gt;
&lt;br /&gt;
In order to enforce that, you'll need to edit your &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; file and add the following line in your eth0/wlan0 definitions: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;post-up iptables-restore /etc/network/iptables&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Firefox ====&lt;br /&gt;
&lt;br /&gt;
===== PAC =====&lt;br /&gt;
&lt;br /&gt;
=== Physical ===&lt;br /&gt;
Feel free to add stuff ;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=Cryptoparty2&amp;diff=4765</id>
		<title>Cryptoparty2</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=Cryptoparty2&amp;diff=4765"/>
				<updated>2013-10-08T08:10:57Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* Possible talks/discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
[[Image:cryptoparty.jpg|400px]]&lt;br /&gt;
== Description ==&lt;br /&gt;
 What is CryptoParty? Interested parties with computers, devices, and the desire to&lt;br /&gt;
 learn to use the most basic crypto programs and the fundamental concepts of their operation!&lt;br /&gt;
* Date: FIXME&lt;br /&gt;
* Doodle: FIXME&lt;br /&gt;
* Event: FIXME&lt;br /&gt;
* http://weise7.org/tmp/cryptobook-v1.1.pdf&lt;br /&gt;
* http://www.cryptoparty.in/organize/howto&lt;br /&gt;
&lt;br /&gt;
== Possible talks/discussion ==&lt;br /&gt;
* What should we do to resist ?&lt;br /&gt;
* Syncronize with [http://hackersatepfl.com/ HackEPFL] ?&lt;br /&gt;
* What about smartphone? How can we protect our privacy on Android (Tengu)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Cryptoparty1]]&lt;br /&gt;
&lt;br /&gt;
== Participants ==&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
* [[User:Prosouth]]&lt;br /&gt;
* [[User:Tengu]]&lt;br /&gt;
* You here&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=Cryptoparty2&amp;diff=4764</id>
		<title>Cryptoparty2</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=Cryptoparty2&amp;diff=4764"/>
				<updated>2013-10-08T08:10:08Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* Participants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
[[Image:cryptoparty.jpg|400px]]&lt;br /&gt;
== Description ==&lt;br /&gt;
 What is CryptoParty? Interested parties with computers, devices, and the desire to&lt;br /&gt;
 learn to use the most basic crypto programs and the fundamental concepts of their operation!&lt;br /&gt;
* Date: FIXME&lt;br /&gt;
* Doodle: FIXME&lt;br /&gt;
* Event: FIXME&lt;br /&gt;
* http://weise7.org/tmp/cryptobook-v1.1.pdf&lt;br /&gt;
* http://www.cryptoparty.in/organize/howto&lt;br /&gt;
&lt;br /&gt;
== Possible talks/discussion ==&lt;br /&gt;
* What should we do to resist ?&lt;br /&gt;
* Syncronize with [http://hackersatepfl.com/ HackEPFL] ?&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Cryptoparty1]]&lt;br /&gt;
&lt;br /&gt;
== Participants ==&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
* [[User:Prosouth]]&lt;br /&gt;
* [[User:Tengu]]&lt;br /&gt;
* You here&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=RaspberryPi1&amp;diff=3795</id>
		<title>RaspberryPi1</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=RaspberryPi1&amp;diff=3795"/>
				<updated>2013-01-21T12:20:44Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* Presentations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
== Description ==&lt;br /&gt;
* 26th February 2013 at 19h&lt;br /&gt;
* Share projects and ideas around the Raspberry PI mini-computer&lt;br /&gt;
* Short prentations (~10mn) about your projects&lt;br /&gt;
* Date: http://framadate.org/l48jvifcabcadjhy&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
* Rorist: Minecraft PI Edition with its simple network text protocol&lt;br /&gt;
* François: TBD (1-Wire temperature monitoring or XMBC with OpenElec)&lt;br /&gt;
* Tengu: Take pictures from a D90 using gphoto2 (for now, only theorical, nothing really usefull is done). Scripts are available here: https://gitorious.org/rpishooter but they are crappy. Even bad in fact ;).&lt;br /&gt;
* Tengu: manage some alarm with a Raspberry and a [http://www.yubico.com/ Yubikey] (pure theory)&lt;br /&gt;
* Sasha: Automated torrent seedbox with rtorrent and auto-irssi&lt;br /&gt;
* Fred: 1-Wire temperature monitoring with [http://owfs.org/ owfs] and Munin&lt;br /&gt;
* Mathias: Software Defined Radio on the Pi and other fun stuff like [http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter FM transmitter] (if time permits). See  also [[SDR]]&lt;br /&gt;
* Polto: Control your radio controlled car from your raspberry pi&lt;br /&gt;
* ''Your presentation here''&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* http://www.raspberrypi.org/&lt;br /&gt;
* http://elinux.org/RaspberryPiBoard&lt;br /&gt;
* http://www.posttenebraslab.ch/wiki/association/people/arekkusu/projects/gpio_fun&lt;br /&gt;
* http://pingbin.com/2012/12/30-cool-ideas-raspberry-pi-project/&lt;br /&gt;
* http://edurobot.ch/raspi/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Participants ==&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
* [[User:Ol1v]]&lt;br /&gt;
* [[User:Freestorm]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[CPU_Boards]]&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=RaspberryPi1&amp;diff=3637</id>
		<title>RaspberryPi1</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=RaspberryPi1&amp;diff=3637"/>
				<updated>2013-01-06T21:30:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* Presentations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
== Description ==&lt;br /&gt;
* 26th February 2013 at 19h&lt;br /&gt;
* Share projects and ideas around the Raspberry PI mini-computer&lt;br /&gt;
* Short prentations (~10mn) about your projects&lt;br /&gt;
* Date: http://framadate.org/l48jvifcabcadjhy&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
* Rorist: Minecraft PI Edition with its simple network text protocol&lt;br /&gt;
* François: TBD (1-Wire temperature monitoring or XMBC with OpenElec)&lt;br /&gt;
* Tengu: Take pictures from a D90 using gphoto2 (for now, only theorical, nothing really usefull is done). Scripts are available here: https://gitorious.org/rpishooter but they are crappy. Even bad in fact ;).&lt;br /&gt;
* Sasha: Automated torrent seedbox with rtorrent and auto-irssi&lt;br /&gt;
* ''Your presentation here''&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* http://www.raspberrypi.org/&lt;br /&gt;
* http://elinux.org/RaspberryPiBoard&lt;br /&gt;
* http://www.posttenebraslab.ch/wiki/association/people/arekkusu/projects/gpio_fun&lt;br /&gt;
&lt;br /&gt;
== Participants ==&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
* [[User:Ol1v]]&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=CoursAndroid1&amp;diff=2839</id>
		<title>CoursAndroid1</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=CoursAndroid1&amp;diff=2839"/>
				<updated>2012-07-18T20:39:03Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* SDK Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
[[Category:Android]]&lt;br /&gt;
= Description =&lt;br /&gt;
* First session of Android development class, focused on beginners.&lt;br /&gt;
* Date: FIXME&lt;br /&gt;
* Doodle: http://www.doodle.com/z54ecrdxr4kbdna7&lt;br /&gt;
* Event: http://fixme.ch/civicrm/event/info?id=45&amp;amp;reset=1&lt;br /&gt;
&lt;br /&gt;
= Content =&lt;br /&gt;
* Installation and configuration of the SDK (a VM will be at disposal for others)&lt;br /&gt;
* Presentation of the tools&lt;br /&gt;
* First application&lt;br /&gt;
&lt;br /&gt;
== SDK Setup ==&lt;br /&gt;
* Install Java/OpenJDK 1.6&lt;br /&gt;
* Download the SDK for your plateform http://developer.android.com/sdk/index.html&lt;br /&gt;
** Extract in /opt/android-sdk for example&lt;br /&gt;
** Correct the sdk permissions (tgz perms are crappy)&lt;br /&gt;
  sudo chown -R &amp;lt;your-user&amp;gt;: /opt/android-sdk&lt;br /&gt;
  chmod -R g-w /opt/android-sdk&lt;br /&gt;
** Add the tools to your path&lt;br /&gt;
  export PATH=&amp;quot;$PATH:/opt/android-sdk/tools:/opt/android-sdk/platform-tools&amp;quot;&lt;br /&gt;
* Run &amp;lt;tt&amp;gt;android&amp;lt;/tt&amp;gt; from the cli to start the sdk manager&lt;br /&gt;
* Install API version 15, 10 and 4 (Android 4.0.3, 2.3.3 and 1.6) from the sdk manager&lt;br /&gt;
* Install Eclipse &amp;gt;= 3.6, (easier to start developping with eclipse then quit when your comfortable)&lt;br /&gt;
** [http://developer.android.com/sdk/installing/installing-adt.html Install the Android Development Tools for Eclipse]&lt;br /&gt;
&lt;br /&gt;
= Project leader =&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
&lt;br /&gt;
= Participants =&lt;br /&gt;
* [[User:Nemen]]&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=User:Tengu&amp;diff=2838</id>
		<title>User:Tengu</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=User:Tengu&amp;diff=2838"/>
				<updated>2012-07-18T20:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: Created page with &amp;quot;Life. Don't talk me about that!&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Life. Don't talk me about that!&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	<entry>
		<id>http://fixme.ch/w/index.php?title=CoursAndroid1&amp;diff=2837</id>
		<title>CoursAndroid1</title>
		<link rel="alternate" type="text/html" href="http://fixme.ch/w/index.php?title=CoursAndroid1&amp;diff=2837"/>
				<updated>2012-07-18T20:24:18Z</updated>
		
		<summary type="html">&lt;p&gt;Tengu: /* SDK Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Workshops]]&lt;br /&gt;
[[Category:Android]]&lt;br /&gt;
= Description =&lt;br /&gt;
* First session of Android development class, focused on beginners.&lt;br /&gt;
* Date: FIXME&lt;br /&gt;
* Doodle: http://www.doodle.com/z54ecrdxr4kbdna7&lt;br /&gt;
* Event: http://fixme.ch/civicrm/event/info?id=45&amp;amp;reset=1&lt;br /&gt;
&lt;br /&gt;
= Content =&lt;br /&gt;
* Installation and configuration of the SDK (a VM will be at disposal for others)&lt;br /&gt;
* Presentation of the tools&lt;br /&gt;
* First application&lt;br /&gt;
&lt;br /&gt;
== SDK Setup ==&lt;br /&gt;
* Install Java/OpenJDK 1.6&lt;br /&gt;
* Download the SDK for your plateform http://developer.android.com/sdk/index.html&lt;br /&gt;
** Extract in /opt/android-sdk for example&lt;br /&gt;
** Correct the sdk permissions&lt;br /&gt;
  sudo find /opt/android-sdk -type d -exec chmod 0755 '{}' \;&lt;br /&gt;
  sudo find /opt/android-sdk -type f -perm /u=rwx -exec chmod 0755 '{}' \;&lt;br /&gt;
** Add the tools to your path&lt;br /&gt;
  export PATH=&amp;quot;$PATH:/opt/android-sdk/tools:/opt/android-sdk/platform-tools&amp;quot;&lt;br /&gt;
* Run &amp;lt;tt&amp;gt;android&amp;lt;/tt&amp;gt; from the cli to start the sdk manager as root&lt;br /&gt;
* Install API version 15, 10 and 4 (Android 4.0.3, 2.3.3 and 1.6) from the sdk manager&lt;br /&gt;
* Install Eclipse &amp;gt;= 3.6, (easier to start developping with eclipse then quit when your comfortable)&lt;br /&gt;
** [http://developer.android.com/sdk/installing/installing-adt.html Install the Android Development Tools for Eclipse]&lt;br /&gt;
&lt;br /&gt;
= Project leader =&lt;br /&gt;
* [[User:Rorist]]&lt;br /&gt;
&lt;br /&gt;
= Participants =&lt;br /&gt;
* [[User:Nemen]]&lt;/div&gt;</summary>
		<author><name>Tengu</name></author>	</entry>

	</feed>