I'm trying to set up a VPN-server from my home router so that external users (from other countries) could connect to it. Basically, I want it to work this way:
External User (IP-address "A") -> connect to my home VPN-server (IP-address "B") -> search web with IP-address "B".
I've watched many YT-guides, which I followed thoroughly and step by step, but I'm not sure it works, since another device's IP-address doesn't change.
I've done so far:
- set up a DDNS adderss;
- set up an OpenVPN server in my router settings;
- exported a config and uploaded it into OpenVPN GUI;
- after some googling added redirect-gateway def1 / push "redirect-gateway def1". Unfortunately, none of these have worked so far.
Some sources say I need a statip IP address to make it work.
Any advice on this issue? And more importantly, is the info about a static IP correct?
UPDATE:
- Somehow I managed to make it work on both Android and iOS devices. IP-address changes to the one provided in the config file.
- However, the same config (or its copy) doesn't work on any PC (have tried on windows and macos so far).
2a. When I use the same config I get the following error:
Options error: unknown --redirect-gateway flag: ipv4
When I fix it, another error occurs: 2b.OPTIONS ERROR: failed to negotiate cipher with server. Configure --data-ciphers-fallback if you want to connect to this server. 2023-09-02 17:08:18 ERROR: Failed to apply push options 2023-09-02 17:08:18 Failed to open tun/tap interface
2c. When I adddata-ciphers-fallback "AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305"
I manage to connect, however the Internet is not accessible and VPN keeps reconnecting all the time.
This is config through which I connect on mobile devices:
client dev tun proto tcp float nobind tls-client remote-cert-tls server cipher AES-128-CBC comp-lzo adaptive resolv-retry infinite persist-key persist-tun remote username.tplinkdns.com port redirect-gateway def1 ipv4 register-dns
Config I try to use on Windows:
client dev tun proto tcp float nobind tls-client remote-cert-tls server data-ciphers-fallback "AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305" comp-lzo adaptive resolv-retry infinite persist-key persist-tun remote username.tplinkdns.com port redirect-gateway def1 register-dns
UPDATE 2: Client config:
client dev tun proto tcp float nobind cipher AES-128-CBC comp-lzo adaptive resolv-retry infinite persist-key persist-tun remote username.tplinkdns.com port redirect-gateway def1
Server config:
client dev tun proto tcp float nobind cipher AES-128-CBC comp-lzo adaptive resolv-retry infinite persist-key persist-tun remote *inner IP-address starting with 10.* the same port
verb 4
and the client toverb 5
, restart the server, try to connect with a client, then post the the logs from both, again anonymizing any of the aforementioned sensitive info.