Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How to tunnel HTTP(s) through filesystem?
2 points by unstuck3958 on Dec 14, 2023 | hide | past | favorite | 11 comments
My work laptop (Windows) has internet access which goes through my company's VPN, but I also need internet access on a Linux Virtual Machine which I'm hosting through VirtualBox.

So, is it possible to set up a shared folder between Windows and Linux guest VM (Debian-based) and to tunnel the internet connection from there? I know it must be possible somehow (for example, see [1]), but would really appreciate some pointers.

[1]: https://news.ycombinator.com/item?id=33568994




You can be inspired by Richard Stallman, who used to have some unusual method (he gave up):

> I generally do not connect to web sites from my own machine, aside from a few sites I have some special relationship with. I usually fetch web pages from other sites by sending mail to a program (see git://git.gnu.org/womb/hacks.git) that fetches them, much like wget, and then mails them back to me. Then I look at them using a web browser, unless it is easy to see the text in the HTML page directly. I usually try lynx first, then a graphical browser if the page needs it (using konqueror, which won't fetch from other sites in such a situation).

https://web.archive.org/web/20151228013607/https://stallman....


If both the host and guest have internet access you are network complete. To access the file systems of both computers you can use Samba shares or use a file sharing application like the one I am working on at https://github.com/prettydiff/share-file-systems

If the guest is does not have internet access then create a virtual switch and on the guest settings add a second nic set to host-based adapter.


Ask HN: How can I get fired but in a really novel way?


Why can't you set up a network device in VirtualBox for the VM which would be bridged to the interface provided by the VPN?


So without going into too many details, I can't do it because my VM would still need to be authorized by one of my company's security providers. Which should've been fine, except that the security staff insists I get a new Linux PC and RDP/VNC my way into it from Windows, which I really don't want to do.

Besides, tunneling through filesystems sounds more fun.


Afaik windows has not what is known as unix sockets.


What’s wrong with the venerable WinSock library? I remember that being a thing way back in the 1990s when I used a 3rd party driver called Trumpet.


Just throwing some random ideas out...

TCP over file tunnel? https://labs.withsecure.com/tools/tcp-over-file-tunnel or the similar https://blog.adamfurmanek.pl/2022/11/12/availability-anywher...

Or maybe establish a named pipe (https://learn.microsoft.com/en-us/windows/win32/ipc/named-pi...) on the Windows host, and try to access and proxy through it on the guest? (https://shvechkov.tripod.com/nptp.html) Never tried, don't know if that would work.

Or a similar idea is to make a virtual serial port (COM port) between the two and try to proxy internet over that using PPP, like in the dialup days: https://docs.oracle.com/en/virtualization/virtualbox/6.0/use... https://tldp.org/HOWTO/PPP-HOWTO/direct.html https://www.vader.dk/index.php?/archives/13-VirtualBox-guest...

If you can set up some sort of connection like that, you might be able to use putty or telnet to redirect network traffic on the guest through the connection

-------------

But overall this is probably a really good way to piss off your IT department. It's a lot of hassle just to get a Linux box with internet access... why are they making you jump through so many hoops to get a VM connected to the internet?

Alternative idea: turn on the hotspot on your phone and just connect to it from the Linux guest

Alternative idea #2: Just use Windows Subsystem for Linux

Alternative idea #3: Put Linux on a USB drive and boot straight from that (if you can) instead of booting into work's Windows (just borrowing the laptop hardware)

Alternative idea #4: Plug another USB wifi stick into the host and have it share its connection there, connect to it from within the guest using the other wifi chip. Technically you're not routing traffic through the VM, one radio is broadcasting and the other is independently receiving...


Thanks for those ideas! Exactly what I'm looking for. Though I've settled for a combination of alternative #4 and #1, I'm using my phone's hotspot with USB Wi-Fi stick.


Other than the fun part, why?

I mean, I've read the situation with company policies but, you can disguise the VM traffic to make it look it came from the Windows host machine. No need to fiddle with weird tunnels.

But yes, totally doable with some Python scripts, yet, slow as f...


id try RDP to the win machine




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: