Ubuntu root as proxy, connected to VPN

Hey guys,

I am looking the following:
I am trying to set up a proxy on my Ubuntu root server, which should be connected to a VPN provider. Only the proxy should be connected to VPN, all other root traffic should not be touched in any way
Is this possible technically?

Regards

VPN as client removes your host from the local net and attaches it to the net of the server, except for the VPN packets themselves. Local net access would ruin the security model -- Either you are all out or all in. Else you could be forwarding outside packets to the inside and inside packets to the outside, extending the formerly secure net.

Ah thanks for your answer Is there any tutorial around how to forwarding with VPN and squid or any alternative?

SSH tunnels are an alternative sort of secure remote access. VPN generally creates am IP device that gets everything but VPN packets, and produces everything but VPN packets, but there are newer variations that run over a TCP/IP connection. One problem original VPN had was that full size packets would grow and have to be fragmented, making them suboptimal is size and less reliable as a lost packet fails reassembly, and the unlost part is discarded, a waste. With a tcp output, a stream not IP datagrams, there can be full sized tcp packets serving VPN of all IP apps and all internal packets sizes with no fragmentation.

Reading RFCs may seem steep, but that is where the real skinny is.