Raspberry Pi 3, OMG

I’ve never imagined there would be such a revolutionary product, such a tiny little computer which is even smaller than the floppy disk, come into the world when I am only in my 20s. I knew its existence probably 3 or 4 years ago, but I have no interest in buying one until recently, when I realized I might need a 24/7 computer that can run linux.

With $35 in 2017, you could buy a Raspberry Pi 3 with WiFi and bluetooth capabilities, 4 USB ports, 1 RJ45 port, 1 HDMI port and an old fashioned 3.5mm headphone jack. Its IO system is so well-rounded. It doesn’t have a good CPU nor GPU, and its RAM is quite limited by 1 Gb, but who needs that much, really?

I bought one because like I mentioned at the beginning, I need a linux machine that can run 24/7 to serve as a gateway of my local network. I learned this technique accidentally when I was browsing the method to improve the connection of game consoles. Yeah, you are right, my purpose to do all this is simply trying to enable me to play online games LoL. I have owned a Nintendo Switch for quite a long time now, and since I came back to China the Internet condition here is quite annoying, with strict NAT type everywhere and usual lack of a public IP. All those factors and complexities have made me unable to connect to other players on my Switch games.

I then turned my research on those game proxies that claimed to be able to speed up my connection to outside world. Basically they are just proxies or VPNs that can redirect UDP traffic so as to give me a public IP. On PCs you could easily do it by installing some software that can do it, but it is hard to do it for consoles since you can’t install software on them. Some people decide to pay extra money to get a smart router which is basically a router with a smarter system on which you can install some “software”, but in essence they are linux-like systems. This fact makes me wonder if I could just use a local machine to serve as a router, and I soon happened to find out there’s a technique called transparent gateway, which is just another machine in the local network that can serve as a gateway to redirect all Internet traffic to a outside server, and what I need to do is simply changing some IP settings in my Switch’s Internet setting.

I have some experience in Linux, partially on my Mac, but mainly on my VPS. However, this time I am dealing with Debian on the Raspberry Pi instead of CentOS on my VPS, and it has some different properties, but not too much. The process is hard, and due to “fear” I don’t want to talk too detailed in this post. I simply install a “software” that can redirect my traffic to a server outside that has a public IP. Firstly, the Raspberry Pi should be able to redirect both TCP and UDP packets, and this could be done by setting up some rules in iptables. Secondly, the server in the outside world, should be able to handle UDP relay as well, and this was a mistake I made during the process. So at the end it is very simple, one step locally and one remotely, but the trials and errors along the way could be daunting to a lot of people. Luckily this is not my case, because I want to solve this problem so badly that I spent hours after work until I can’t keep my eyes open. (shameful problem-solver personality)

Now that there’s a 24/7 smart “router” in my house, I feel like there’re more opportunities for a smarter house. I remember I brought an Apple TV 4 back from the states, but couldn’t make it work because back then I didn’t have a machine that can do traffic relay, so my Apple TV is terribly crippled by the Internet in China. Proudly I am going to make it back to work when I am home in the upcoming Spring Festival, with my cutie Raspberry Pi, and believe it or not, it only costs me $35.

Leave a Reply

Your email address will not be published. Required fields are marked *