0

What I want to achieve is to use a VPN connection via proxy so I can use it in individual programs that have a proxy setting, without having to run all my traffic through the VPN[*].

[*] the advantages of doing it like this - instead of using one of these solutions - for me are 1) I'm not running openvpn on the host, so there is no way to mess it up in a way to accidentally route traffic through the VPN and 2) I don't have to mess with iptables or similar on my host, which I don't feel that confident about).

What I did: Create a VM (ubuntu on virtualbox) and install squid & run openvpn on it. So my connection (should) work like this:

App on host ---via-squid---> VM ---via-VPN---> the internet

There aren't any special configs I used; I've just installed squid and ran openvpn --config ./some_config.ovpn.

This used to work well, but for some reason it doesn't work anymore; instead, I'm getting a timeout (I'm not sure if something on the VPN changed, or if it's my system, or something else).

I tried to check each link in the chain, and they still work:

App on host ---via-squid---> VM ---without-VPN---> the internet
-> this works (so the problem isn't squid)

VM ---with-VPN---> the internet
-> this works (so the problem isn't the VPN)

App on guest ---via-squid---> VM ---with-VPN---> the internet
-> even this works (tested with "url --proxy localhost:3657 https://ipinfo.io")
    (so it seems that the problem also isn't the combination of squid and VPN)

Why does my connection time out when using the entire chain (even though each individual link seemingly works fine)?

2
  • 1
    Can you still reach your squid on the vm from your host, while VPN beeing turned on? Maybe there is a routing issue between the host an VM, if VPN is on. Commented Aug 31, 2021 at 11:35
  • @user3188140 I don't think so. I'm trying nc [guest vm] 3128 and it doesn't give me anything, just stalls / times out. I can't connect to any other open ports either, and can't even ping the VM. So you are probably correct (but I'm not knowledgeable enough with network configs to fix this; do you have any hints?)
    – tim
    Commented Aug 31, 2021 at 11:51

0

You must log in to answer this question.

Browse other questions tagged .