From: robin This website is mostly used for email and personal articles / programming projects. Please scan the tag below to contact me. This website is mostly used for email and personal articles / programming projects.
- Please scan the tag below to contact me.
+robinkrens.nl
-
- robinkrens.nl
+My Playground
-
+
-
- ___________________________ -< Wish you another lovely day! > - ------------------------------ - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || -+ -
- -
- -© robinkrens.nl -- Peace!
diff --git a/index.md b/index.md new file mode 100644 index 0000000..fc4cf6b --- /dev/null +++ b/index.md @@ -0,0 +1,19 @@ +# robinkrens.nl + +This website is mostly used for email and personal articles / programming projects. Please scan the tag below to contact me. + +## My Playground + +* [Tunneling, repackaging and VPN](./tunneling.html) +* Wechat development / 微信å°ç¨åº +* [Chinese learning](./chinese.html) +* [Linux resources](./resources.html) +* [Rob's github](http://45.76.159.1/gitweb/) +* Other servers +* My travel map +* Experiments + +## Contact +![contact erweima](files/contact.png) +--- +© robinkrens.nl -- Peace! diff --git a/resources.html b/resources.html index 0d4e14d..178c874 100644 --- a/resources.html +++ b/resources.html @@ -28,8 +28,8 @@Although there is more abstract software to manage firewalls, like ufw on debian-based systems and firewall-cmd on redhat systems, Iptables will help you understand what actually happens during filtering, mangling or routing a package. https://www.frozentux.net/iptables-tutorial/iptables-tutorial.html has a structured approach in explaining what happends when a package hits the firewall. Pay extra attention to Network Address Translation. Here is another nice HOWTO: https://netfilter.org/documentation/HOWTO/NAT-HOWTO-5.html
-Please have a look at http://www.robinkrens.nl/gfw.html +
Please have a look at http://www.robinkrens.nl/tunneling.html
Tinc is a VPN daemon which tunnels IP packets and Ethernet frames over UDP. More on Tinc can be found on: http://tinc-vpn.org Here I will show a tinc setup with an alpha (as a listening peer) and a beta (a peer connecting to alpha). After setting up the VPN, alpha will be the gateway for beta. All traffic from beta will be routed through alpha and back. I will basically retell the man page documentation: https://tinc-vpn.org/documentation-1.1/tinc.conf.5 but in a more tutorial kind of way. diff --git a/tinc.txt b/tinc.txt index 949d41d..06a7f42 100644 --- a/tinc.txt +++ b/tinc.txt @@ -1,4 +1,4 @@ -robinkrens.nl - TINC as a gateway +robinkrens.nl - Redirecting traffic and TINC ===== Tinc is a VPN daemon which tunnels IP packets and Ethernet frames over UDP. More on Tinc can be found on: http://tinc-vpn.org diff --git a/tmp.txt b/tmp.txt new file mode 100644 index 0000000..b76f4eb --- /dev/null +++ b/tmp.txt @@ -0,0 +1,49 @@ + +robinkrens.nl - On VPN and bypassing a firewall +******** + +Let's say you want to connect to a company network and access all the computers in this network (behind a firewall) One way to do this is to setup a Virtual Private Network. Although you are not physically in the same building, all the other computers will think you are, hence *Virtual* Private Network. After you connect to this VPN, you will be assigned a local IP (i.e. 10.0.0.5) and communicate directly to all computers in this range directly. + +In case of bypassing a Internet Service Provider (ISP) or Great Firewall (GFW), you want to access all the websites that are normally not accessible. There are many ways to this. Software written to setup up VPNs are especially useful for this. Add some additional routing and you bypassed the firewall. Look at the following illustration + + + [Pity you] -------- [ISP/GFW: No youtube!]-------- [YouTube.com] + + +The ISP or GFW has some firewall rules to block certains IPs or to detect certain *suspicious* traffic. But let's say you have access to a server that isn't behind the firewall. Would you be able to redirect your Youtube request through this server and then send it to your PC? Well, yes. + + [Pity you] -------- [ISP/GFW]----------[Not blocked server]--------[Youtube.com] + +Hmm, still pity you. Although your server can access YouTube.com, if it sends traffic back it still has to send to the ISP/GFW. So unless the firewall rules + + + +The setup is as follows + + +Some alternative software to bypass a huge firewall (as in your ISP or a country). A list of sample configuration. + + +Basic Tunneling +--------------- +Basic tunneling, or IP in IP. Basically we connect to networks that normally would not be able to talk to each other (directy) +This setup is straightforward like this: + + ExtIP 1.2.3.4 ---- ( INTERNET ) ---- ExtIP 5.6.7.8 + + Local: 10.0.1.0/24 ----- [TUNNEL] ----- 10.0.2.0/24 + ExtIP: 1.2.3.4 5.6.7.8 + | | + | | + |-------- ( INTERNET ) -------------| + + +This version of tunneling has been supported since the early kernel versions of linux (<1.3). + +No encrytion here. No IPV6 or anything other fancy. + + ip tuntap add tun0 mode tun + ip addr add 192.168.1.2 dev tun0 + ip add route ... + + diff --git a/tunneling.html b/tunneling.html index 436bd74..bc41648 100644 --- a/tunneling.html +++ b/tunneling.html @@ -12,9 +12,9 @@
This page lists tutorials and sample code.
diff --git a/resources.txt b/resources.txt index 279c72e..57fd22e 100644 --- a/resources.txt +++ b/resources.txt @@ -27,9 +27,9 @@ Although there is more abstract software to manage firewalls, like *ufw* on debi -Virtual Private Networks +Virtual Private Networks and Tunneling ---- -Please have a look at http://www.robinkrens.nl/gfw.html +Please have a look at http://www.robinkrens.nl/tunneling.html Cheatsheets ------- @@ -37,4 +37,4 @@ Cheatsheets Here are some good cheatsheets for commonly used tools * VI(M) - https://vim.rtorr.com -* GIT / GITHUB - +* GIT / GITHUB - http://www.robinkrens.nl/cheatsheets/git.pdf diff --git a/tinc.html b/tinc.html index 21b1ede..87e210d 100644 --- a/tinc.html +++ b/tinc.html @@ -2,12 +2,12 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
diff --git a/tunneling.txt b/tunneling.txt index 59354cc..36a6414 100644 --- a/tunneling.txt +++ b/tunneling.txt @@ -3,7 +3,7 @@ robinkrens.nl - Tunneling, repackaging and VPN This page lists tutorials and sample code. -* Using tinc as a gateway. A simple setup with two peers forwarding data: http://www.robinkrens.nl/tutorials/tinc.html -* Fastd setup. Similar setup as the above one -* Strongswan +* Redirecting traffic and TINC. A simple setup with a peers forwarding traffic: http://www.robinkrens.nl/tutorials/tinc.html +* Fastd setup. Similar setup as the above with fastd: http://www.robinkrens.nl/tutorials/fastd.html +* Strongswan: A mobike setup (not published)