Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide multiple hostnames/IP addresses for clients #567

Open
AMDBartek opened this issue Mar 17, 2020 · 10 comments
Open

Provide multiple hostnames/IP addresses for clients #567

AMDBartek opened this issue Mar 17, 2020 · 10 comments

Comments

@AMDBartek
Copy link

AMDBartek commented Mar 17, 2020

Have the option to provide multiple ports and hostnames/IP addresses while installing OpenVPN using the script.

This would be useful if a place has a firewall and the default port is blocked but you provided multiple ports so it can use another port that you provided like 443 or 80. It could also be useful if a firewall blocks hostnames because it can use a provided IP address to directly connect without the hostname.

This feature would be extremely useful for me so I would be very grateful if this could be implemented.

@AMDBartek AMDBartek changed the title Have the option to provide multiple ports and hostnames/IP addresses while installing OpenVPN using the script. [Request] Have the option to provide multiple ports and hostnames/IP addresses while installing OpenVPN using the script. Mar 17, 2020
@angristan
Copy link
Owner

For the ports: #542

For the hostname/IP, this is on the client side, not something that the script can manage except upon creation

@AMDBartek
Copy link
Author

AMDBartek commented Mar 18, 2020

@angristan I mean while installing OpenVPN (upon creation) using the script, where it asks you to give a IP/hostname there should be an option to provide multiple IPs/hostnames, sorry for the confusion.

@angristan
Copy link
Owner

@AMDBartek okay, but what would you do with multiple IPs/hostnames?

@AMDBartek
Copy link
Author

@angristan, For example, a computer has multiple external IP addresses/hostnames and one of the IP addresses/hostnames gets blocked by a firewall on a network that you don't own you could connect with the other IP addresses/hostnames. I would appreciate this being added to the script.

@angristan
Copy link
Owner

Yes but that is simply not supported by OpenVPN.

@AMDBartek
Copy link
Author

But if my computer has multiple external IP addresses/hostnames couldn't I connect from both of them?

@AMDBartek
Copy link
Author

It is supported by OpenVPN, the client-template.txt file could contain something like this as the client ovpn file can have multiple remote listed and I don't see why this couldn't be implemented in the script. Down below is an example of a client ovpn file with multiple remote
listed:

client
proto udp
remote hostname1.example.com 443
remote hostname2.example.com 443
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_EEFghRTwEmCTByUu name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3

@angristan
Copy link
Owner

Thanks, you're correct indeed:

https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/

On the client, multiple –remote options may be specified for redundancy, each referring to a different OpenVPN server.

@angristan angristan reopened this Mar 19, 2020
@angristan angristan changed the title [Request] Have the option to provide multiple ports and hostnames/IP addresses while installing OpenVPN using the script. Provide multiple hostnames for clients Mar 19, 2020
@AMDBartek AMDBartek changed the title Provide multiple hostnames for clients Provide multiple hostnames/IP addresses for clients Mar 19, 2020
@randshell
Copy link
Contributor

I don't think it's a very common use case with a private openvpn server but maybe it can be useful for #464

@AMDBartek you can edit /etc/openvpn/client-template.txt to include this option on new profiles.

@moonprogrammer
Copy link

Nowadays each Server/VPS comes with about 1-IPv4 at least. Installing on multiple servers will increase the security instead of using one server to centralize everything @angristan ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants