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.<p>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.<p>[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):<p>> 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).<p><a href="https://web.archive.org/web/20151228013607/https://stallman.org/stallman-computing.html" rel="nofollow noreferrer">https://web.archive.org/web/20151228013607/https://stallman....</a>
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 <a href="https://github.com/prettydiff/share-file-systems">https://github.com/prettydiff/share-file-systems</a><p>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.
Just throwing some random ideas out...<p>TCP over file tunnel? <a href="https://labs.withsecure.com/tools/tcp-over-file-tunnel" rel="nofollow noreferrer">https://labs.withsecure.com/tools/tcp-over-file-tunnel</a> or the similar <a href="https://blog.adamfurmanek.pl/2022/11/12/availability-anywhere-part-12/index.html" rel="nofollow noreferrer">https://blog.adamfurmanek.pl/2022/11/12/availability-anywher...</a><p>Or maybe establish a named pipe (<a href="https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipes" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/windows/win32/ipc/named-pi...</a>) on the Windows host, and try to access and proxy through it on the guest? (<a href="https://shvechkov.tripod.com/nptp.html" rel="nofollow noreferrer">https://shvechkov.tripod.com/nptp.html</a>) Never tried, don't know if that would work.<p>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: <a href="https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/serialports.html" rel="nofollow noreferrer">https://docs.oracle.com/en/virtualization/virtualbox/6.0/use...</a> <a href="https://tldp.org/HOWTO/PPP-HOWTO/direct.html" rel="nofollow noreferrer">https://tldp.org/HOWTO/PPP-HOWTO/direct.html</a> <a href="https://www.vader.dk/index.php?/archives/13-VirtualBox-guest-OS-serial-port-with-named-pipes.html" rel="nofollow noreferrer">https://www.vader.dk/index.php?/archives/13-VirtualBox-guest...</a><p>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<p>-------------<p>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?<p>Alternative idea: turn on the hotspot on your phone and just connect to it from the Linux guest<p>Alternative idea #2: Just use Windows Subsystem for Linux<p>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)<p>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...
Other than the fun part, why?<p>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.<p>But yes, totally doable with some Python scripts, yet, slow as f...