I have a server without access to the Internet but every now and then I need to update some of its packages. In order to make my life easier, I am using my laptop which is also running Linux to share the laptop's WiFi connection over the Ethernet interface of the laptop and connect the server to the laptop with normal Ethernet cable. Of course, I am also changing the GW on the server to match the IP address of the Ethernet interface of my laptop.
I know how I can do that from the network manager GUI but I was wondering how I can do the same using the command line. I want to find a solution which preferably doesn't involve writing
IPTables custom rules. The idea is that I want to write a script and an alias, to do exactly that.
As soon as I am done I will share the source code with you guys, here and also on
Github, that's the beauty of open-source after all.