V
V
Vasily Ivanov2021-08-11 18:19:04
linux
Vasily Ivanov, 2021-08-11 18:19:04

How to use socks5 proxy with openvpn client?

I have a virtual machine that I use as a gateway, on which I want to deploy two dante servers on different ports and each server must work with the tun interface, I have two of them (tun0 and tun1). I get them when I start two openvpn clients. My routing tab is as follows:

Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0         10.237.20.194   192.0.0.0       UG    0      0        0 tun0
0.0.0.0         10.243.33.226   128.0.0.0       UG    0      0        0 tun1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 enp0s3
10.237.20.194   0.0.0.0         255.255.255.255 UH    0      0        0 tun0
10.243.33.226   0.0.0.0         255.255.255.255 UH    0      0        0 tun1
128.0.0.0       10.243.33.226   128.0.0.0       UG    0      0        0 tun1
192.0.0.0       10.237.20.194   192.0.0.0       UG    0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 enp0s3
219.100.37.73   192.168.0.1     255.255.255.255 UGH   0      0        0 enp0s3
219.100.37.169  192.168.0.1     255.255.255.255 UGH   0      0        0 enp0s3


For dante server I use this config:
logoutput: /var/log/danted.logenable
internal: enp0s3 port = 4246
external: tun0

clientmethod: none
socksmethod: none

user.privileged: proxy
user.unprivileged: nobody

user.libwrap: nobody

client pass {
        from: 0.0.0.0/0 to: 0.0.0.0/2
        log: error connect disconnect
}

client pass {
        from: 0.0.0.0/0 to: 192.0.0.0/2
        log: error connect disconnect
}

socks pass {
       from: 0.0.0.0/0 to: 0.0.0.0/2
       log: error connect disconnect
}

socks pass {
       from: 0.0.0.0/0 to: 192.0.0.0/2
       log: error connect disconnect
}


If I change the settings under tun1 in this config, then the proxy server will stop working. Where did I go wrong? Can this be done at all? Maybe it can be done with something else. I need to connect from my machine using socks5 proxy to the server located on the virtual machine

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question