OpenVPN client freezes on connection

I have a network of machines inside an OpenVPN network. With no problem, I can connect into that network from my local machine:

openvpn --config ./myconfig.ovpn --auth-user-pass ./mycredentials

The problem is that I am trying to connect another remote machine (a cloud based VPS) as a client. Using the same config file and credentials on the VPS will not work.

See here for similar issue.

Basically what happens is the machine freezes up. My current shell session stops responding. My only way out of it is to reboot the machine. To make it worse, if I run it as a service (service openvpn start with a config file in /etc/openvpn) I cannot even get back into the machine at all. Even after a reboot.

Maybe the connection is being established and it is cutting off my SSH? I'm really not sure. What I really need to figure out though is how to setup a VPS as a client to my VPN and still be able to control the machine.

2
задан 9 January 2018 в 21:55
1 ответ

Итак, после НАМНОГО больше работы над этим ...Я обнаружил, что действительно могу попасть в машину (хотя и не через SSH). Когда я выключил openvpn, я смог снова войти в SSH как обычно. Подозрения подтвердились.

Затем возник вопрос: как мне подключиться по SSH к клиенту OpenVPN?

Я нашел ответ.

Для всех, у кого есть проблема, я также помещаю решение здесь:

ip rule add from x.x.x.x table 128

ip route add table 128 to y.y.y.y/y dev ethX

ip route add table 128 default via z.z.z.z

Где xxxx - ваш общедоступный IP-адрес, yyyy / y - это подсеть вашего общедоступного IP-адреса, ethX - ваш публичный интерфейс Ethernet, а zzzz - шлюз по умолчанию.

1
ответ дан 3 December 2019 в 12:33

Теги

Похожие вопросы