<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Black Robot on Medium]]></title>
        <description><![CDATA[Stories by Black Robot on Medium]]></description>
        <link>https://medium.com/@blackrobot666?source=rss-f25154985b7c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-u0PLF044iEYihmE.jpg</url>
            <title>Stories by Black Robot on Medium</title>
            <link>https://medium.com/@blackrobot666?source=rss-f25154985b7c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:43:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@blackrobot666/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[For Iranian Protests: How to setup VPN/Proxy chains to bypass internet blockade]]></title>
            <link>https://medium.com/@blackrobot666/for-iranian-protests-how-to-setup-vpn-proxy-chains-to-bypass-internet-blockade-e8daa13844e2?source=rss-f25154985b7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8daa13844e2</guid>
            <category><![CDATA[iran]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[protest]]></category>
            <category><![CDATA[proxy]]></category>
            <dc:creator><![CDATA[Black Robot]]></dc:creator>
            <pubDate>Mon, 18 Nov 2019 09:28:28 GMT</pubDate>
            <atom:updated>2019-11-18T09:28:28.163Z</atom:updated>
            <content:encoded><![CDATA[<p>I was in a hesitate to write or not to write this article. But this is the time and place that we have do something. People are getting shot in the streets and they don’t know how to communicate with each other. The videos cannot be shared so the others can see the violence and abuse of this regime and they remain silent. And this silent is killing us, torturing our people for 40 years it has to come to an end. I am no journalist but a computer expert and as a computer expert I have to share my knowledge for the good of my people. I expect you to do the same. It’s our national and even human responsibility to deliver this to our people.</p><p>To begin you need two servers one in an Iranian data center and one outside (preferably Europe because of latency).</p><p>First, setup an openconnect VPN on the european server. the easy way is to set it up with docker:</p><pre># touch ocpasswd<br># docker run --name ocserv --privileged -v $PWD/ocpasswd:/etc/ocserv/ocpasswd -p 8443:443 -p 8443:443/udp -d tommylau/ocserv<br># docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -g &quot;Route,All&quot; admin</pre><p>The first two will setup the vpn server and the latter creates a user who can access the VPN.</p><blockquote>Warning! This configuration can cause service disruption. So please do this on a dedicated instance for this special purpose.</blockquote><p>After this, we have to setup the server in Iran. I assume Iran server address is 100.0.0.2 and it connects to the network via gateway 100.0.0.1</p><p>The idea is to connect the server to VPN so the default route will be the VPN tunnel and then we have to route Iranian IPs through the server’s original gateway.</p><pre>$ ip route<br>...<br>default dev tun0 scope link<br>210.5.232.0/25 via 100.0.0.1 dev ens4 <br>210.5.233.0/25 via 100.0.0.1 dev ens4 <br>210.5.233.128/26 via 100.0.0.1 dev ens4 <br>212.1.192.0/21 via 100.0.0.1 dev ens4 <br>212.6.37.0/24 via 100.0.0.1 dev ens4 <br>212.6.38.0/24 via 100.0.0.1 dev ens4 <br>212.6.41.0/25 via 100.0.0.1 dev ens4 <br>212.6.42.0/24 via 100.0.0.1 dev ens4 <br>212.6.45.0/24 via 100.0.0.1 dev ens4<br>...</pre><p>To have this configuration first you need to remove the default route and to not to lose the connection to the server add a route to your IP (I assume your ip is 150.0.0.10.)</p><pre>$ ip route add 150.0.0.10/32 via 100.0.0.1<br>$ ip route del default via 100.0.0.1</pre><p>And then you can add all the Iranian routes to your server to do this:</p><pre><a href="https://github.com/arastu/iran_ip_ranges/blob/master/iran_ip_range.json">$ wget https://github.com/arastu/iran_ip_ranges/blob/master/iran_ip_range.json</a><br>$ for range in $(jq .[] ../iran_ip_range.json | sed &#39;s/&quot;//g&#39; | xargs); do<br>  ip route add $range via 100.0.0.1;<br>done;</pre><p>And then connect to the European VPN you made (assuming the IP is 200.0.0.10):</p><pre>$ openconnect 200.0.0.10</pre><p>Confirm this with:</p><pre>$ ip route | grep tun0<br>default dev tun0 scope link</pre><p>Then, setup ocserv on Iran server. (It’s exactly like the european server).</p><pre># touch ocpasswd<br># docker run --name ocserv --privileged -v $PWD/ocpasswd:/etc/ocserv/ocpasswd -p 8443:443 -p 8443:443/udp -d tommylau/ocserv<br># docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -g &quot;Route,All&quot; admin</pre><p>Then you need to set up IP forwanding and NAT to do the address translation for Iranian IPs.</p><pre># sysctl -w net.ipv4.ip_forward=1<br># sudo iptables -A FORWARD -j ACCEPT<br># sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE</pre><p>It’s done. You can share the credentials with others so they can access the internet too. Please don’t hesitate to ask me any questions on twitter/email. I will be there to help you.</p><p>And have my GPG fingerprint.</p><pre>pub   rsa2048 2019-11-18 [SC] [expires: 2021-11-17]<br>      583F 74D5 BEC5 7C98 E4ED  6F46 CDA7 2999 C8B8 77A7<br>uid           [ultimate] BlackRobot &lt;<a href="/service/mailto:blackrobot666@gmail.com">blackrobot666@gmail.com</a>&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8daa13844e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>