postoronnim-v
Occasional Visitor
Please tell me, is it possible to create such a network so that the end device connects to the RT-AX68U router (has a public static IP address) and gains access to the Internet through a VPS server?
Sure, If you just want internet via the VPS it's quite easy.Please tell me, is it possible to create such a network so that the end device connects to the RT-AX68U router (has a public static IP address) and gains access to the Internet through a VPS server?View attachment 56321
Thank you for your time. Perhaps I don't understand you completely. I used WireGuard VPN installer for Linux servers on my VPS. I configured a VPN client on the router and now I can connect the router’s clients to the Internet of the VPS server. But I need the client to be able to connect to the router through a public IP address, which the router receives from the provider. That is, the server must also be configured on the router. I apologize if I mislead you, but I am far from programming.In your case you just create a server peer on the vps, create the client config and import into your router.
Alright, then you setup a server on your router as well (vpn->vpn server) and if you don't have a static IP you will need a ddns.Thank you for your time. Perhaps I don't understand you completely. I used WireGuard VPN installer for Linux servers on my VPS. I configured a VPN client on the router and now I can connect the router’s clients to the Internet of the VPS server. But I need the client to be able to connect to the router through a public IP address, which the router receives from the provider. That is, the server must also be configured on the router. I apologize if I mislead you, but I am far from programming.
Default will be fine.What address should be specified in the Tunnel IPv4 column? Or leave the default value?
No as it doesn't overlap ip.Will there be a conflict with the VPS server address?
You need to click the + sign by the VPN client, just above "No Data in table" to create a client config to your router server. Then you have the option to either download a config file or scan a qr code to transfer to your client device.And then how to correctly connect these networks using the router settings?
Create a rule in vpn director, like this:I set up a server on the router. I can connect from another device to the router. But how can I now connect to the VPS server through the router server?
Just a curious question, why don't you let your clients connect directly to the vps instead of going through your router if you only need internet through the vps?Thanks a lot. Thanks to your help, I was able to set up the network.
I am in a country (Russia) that has recently introduced Internet censorship. Recently, all Internet providers began to block most VPN protocols (L2TP, IPsec, PPTP, OpenVPN, WireGuard) if the connection is established with an IP located outside the country. Everything works inside the country. But I was able to establish a connection to my VPS located outside the country. This connection is stable unless broken. It is also important that the connection is from one IP (otherwise the VPS IP will be blocked). Therefore, I made a decision: establish and maintain a connection with my VPS, and connect devices using normal protocols, connecting to my router.Just a curious question, why don't you let your clients connect directly to the vps instead of going through your router if you only need internet through the vps?
Thanks for the explanation and lets hope it keeps working for you!I am in a country (Russia) that has recently introduced Internet censorship. Recently, all Internet providers began to block most VPN protocols (L2TP, IPsec, PPTP, OpenVPN, WireGuard) if the connection is established with an IP located outside the country. Everything works inside the country. But I was able to establish a connection to my VPS located outside the country. This connection is stable unless broken. It is also important that the connection is from one IP (otherwise the VPS IP will be blocked). Therefore, I made a decision: establish and maintain a connection with my VPS, and connect devices using normal protocols, connecting to my router.
Not sure that if it may help you in the future, but it would be possible to have the VPS initiate the connection to your router instead of the other way (some simple scripting required). You could still use the connection for internet. Maybe this would help get around your situation?I am in a country (Russia) that has recently introduced Internet censorship. Recently, all Internet providers began to block most VPN protocols (L2TP, IPsec, PPTP, OpenVPN, WireGuard) if the connection is established with an IP located outside the country. Everything works inside the country. But I was able to establish a connection to my VPS located outside the country. This connection is stable unless broken. It is also important that the connection is from one IP (otherwise the VPS IP will be blocked). Therefore, I made a decision: establish and maintain a connection with my VPS, and connect devices using normal protocols, connecting to my router.
Sure, no programming really required but we will need to:Could you help with this?
sudo -su
wg show
nano /etc/wireguard/VPS.conf
Endpoint = <router public ipv4>:port
Endpoint = 111.222.333.444:51819
nano /jffs/scripts/firewall-start
#!/bin/sh
iptables -I INPUT -p udp --dport 51819 -j ACCEPT
chmod +x /jffs/scripts/firewall-start
iptables -I INPUT -p udp --dport 51819 -j ACCEPT
Looking good!I did everything as you wrote. How to check that everything is working? Thecommand on VPS produces the following resultCode:wg show
wg set wgc1 listen-port 51819
wg show
I get this error:If you execute this at the prompt it should just start to work
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!