route 10.99.77.55 255.255.255.255 net_gateway
I used this code line in ovpn config so it worked.
Now I want to bypass an IP range instead of single IP, How can I do it?
something like that:
route 10.99.77.55/22 255.255.255.255 net_gateway
Did you activate kernel forwarding?
echo 1> /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.ip_forward=1
Your box will act as a router, not as a workstation, and this behaviour is disabled by default, for security reasons!
Be sure to permit forward for only legit network ranges from both of your nets using iptables.
This is because of PrivateTmp directive in systemd openvpn unit's config.
Create /etc/systemd/system/openvpn-server@.service.d/10-override.conf file with following content:
and you'll be able to write to /tmp in your scripts (if you really need to).
Change openvpn-server@.service.d to openvpn-server@YOURCONF.service.d to match ...
You say you opened the .ovpn file and you can see the duplicate-cn configuration line, but the .ovpn file is the client-side config. Just to be clear, did you put the duplicate-cn line in the server.conf file and restart the service?
This guide has a dedicated setup for OpenVPN server on Oracle Cloud.
(Archive.org link in case original post goes down)
If all your ports are serving http/s content, then setting up nginx or a different reverse proxy would probably be the best way to go.
If you need other data streams that are not http/s to work I would suggest using iptables like mentioned in the example here: https://my.esecuredata.com/index.php?/knowledgebase/article/49/how-to-redirect-an-incoming-...
Here is what we got (your image will be unavailable soon)
What you are doing when establishing the second VPN is setting a second route for the same link CLI1 to CLI2. So when CLI2 try to reach CLI1 using VPN2, CLI1 use ...
Be aware of this conflict with server pushed options:
You may have an error:
Options error: option 'route' cannot be used in this context
This issue materializes because “route-nopull” option takes away the permission from the client to install server-pushed routes, ...
I have the same problem. I checked NordVPN UDP and TCP connections from this link.
with the same ADSL network that I have problem. NordVPN connections worked very well, but all of other openvpn TCP and UDP connections are blocked except openvpn+proxy connections. openvpn+proxy is very slow.
I don't know why NordVPN TCP and UDP connections work without any ...
For the systemd-resolved solution to work, openvpn must be stopped with SIGTERM, not with SIGKILL (else, the 'down' hook is not called to bring back /etc/resolv.conf to the original configuration).
If you call openvpn on the command line, then CTRL-c out, the 'down' hook is called, because openvpn is killed with SIGTERM
If you call openvpn in a ...
This message is printed when no IPv4/v6 preference is given in the config (i.e. proto udp/tcp is used) and OpenVPN is running as a server. Just change in server.conf on what you need udp4/upd6:
Updated: For tcp protocol (not udp) just change in server.conf on what you need tcp4/tcp6:
2022 update (Arch Linux)
To set a public dns server and update resolvconf, add the following to your ovpn client profile file:
dhcp-option DNS 220.127.116.11
I post my solution here, maybe it can help someone.
I code a script, that would try to query the MAC address of my home router, if success(meaning that I'm home), stop to connect the VPN.
And then modify the systemd service file(vpn-to-home.service), add a line ExecStartPre=/usr/local/bin/stop-if-lan.sh.
The script stop-if-lan.sh: