Pergunta

I have made VPN server in my local (home) network, it does run in bridging mode.

Now, I want to configure my notebook to be able to connect to my VPN, but I want it to use server's local lan IP when using my notebook at home and use server's public IP when using my notebook at school/...

How can I add alias for server address in client configuration?

Foi útil?

Solução

<connection>
  remote 11.22.33.44 1194 udp
</connection>
<connection>
  remote 10.0.0.1 1194 udp
</connection>

According to documentation:

An OpenVPN client will try each connection profile sequentially until it achieves a successful connection.
--remote-random can be used to initially "scramble" the connection list.

Outras dicas

Put it in your .bashrc or zshrc. alias vpn="sudo sh -c 'nohup openvpn /etc/openvpn/client.ovpn 2>&1 > /dev/null &'"

Note. if you are using user/password to auth, you need put it into /etc/openvpn/authfile, ➜ ~ cat /etc/openvpn/authfile xuxiaoping xuxiaoping@123 ```

then, change /etc/openvpn/client.ovpn as auth-user-pass /etc/openvpn/authfile

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top