Setting Up A VPN

I've been looking to set up a vpn and so far even with the guides from openwiki or youtube vids I haven't been able to successfully set up OpenVPN or wireguard on my router. Any help to setup a vpn wireguard specifically since I've read its the better of the two will be very appreciated.

Which guides have you read? Where did you get stuck? Did you finish a setup that didn't work, or did you have difficulty understanding what to do in the first place?

Here are good resources: OpenWrt wiki for Wireguard and OpenVPN.

If you're having trouble, it is most effective if you give us specific information about what you have done, what is not appearing to work, and where you are stuck. We also need to know what version of OpenWrt you are using and on what hardware.

1 Like

I tried a different wiki for wireguard, ill try this one and get back to you. Yes, I finished two setups the first one my ip wasn't being hidden which i presume is what wireguard is supposed to do and the second one I lost access to the internet.

Are you connecting to a commercial VPN provider? If so, you might also need to refer to their documentation.

1 Like

No im not but in step 4 of the wiki when I select the WireGuard VPN for the new interface im prompted with a new popup telling me to enter in the private key, listen port, and ip address. What do i put in for these?

Then what is your other endpoint?

1 Like

other endpoint? now I'm confused... can you please tell me how exactly you went about to setting up your vpn

when i looked up how to setup wireguard vpn on openwrt i found different vpn sites with steps on how to set it up... is this what you mean?

You need two endpoints for a VPN. One local (your router or your computer or something) and one remote.

A VPN connection is called a tunnel. The idea is that you have an encrypted data channel between the two endpoints, creating a "tunnel" through which the data flows. One common use is to hide your traffic from your local ISP by encrypting it through a provider. You send data from your house (as example) -- It is encrypted as it enters that tunnel. The data goes to the "exit" (say a commercial VPN provider), where it is decrypted and then traverses the internet to get to its destination (a website, or whatever). This makes it impossible for your ISP to see your data.

1 Like

To make a silly analogy... if you pick up the phone and don't dial a number, you can scream into the phone all you want, but your voice doesn't go anywhere unless you actually have a connection to another phone at the other end.

The main use cases for a VPN are:

  • using a commercial service to re-route your Internet usage so your ISP can't tell where you are visiting and/or you want an IP address in a different country so you can visit sites that restrict usage to certain countries.

  • directly linking two non-attached places that you control the networks in both, like a home and office.

  • making a secure connection through a mobile or public network (e.g. hotel) back to your home or office. This is a variant of directly linking two places called the Road Warrior.

1 Like

is this an example of a commercial vpn I can use and if not can you recommend a few ones.

The first one is what I'm aiming for? Also will I be able to have an IP address in a different country in case of accessing a restricted site like you stated with setting up wireguard on the openwrt router?

Yes, this is a commercial VPN provider. There are a very large number of options out there... typically OpenWrt forums are not really geared to recommending any specific VPN provider -- they each have their own benefits and drawbacks, costs, availabilities, and account details.

You will need to setup an account with a commercial VPN provider to do what you are asking (many of them are paid services). Your OpenWrt router can be setup as a VPN client for many different providers, allowing your entire network to be seamlessly tunneled through the VPN.

1 Like

Man I was looking for a way to setup a free vpn for my router but with what you're saying it seems this might not be likely, regardless thanks for guiding me through this.

not sure a free vpn will give you the option to setup wireguard on router, sure not

you need something like that, thats it
(do not use that config, just an exemple)

# WireGuard Config
[Interface]
PrivateKey = eIwek8tDADRwPw0/6/2OqFanaJzyBh8kGtXXXXXX7fcNlM=
ListenPort = 51820
DNS = 1.1.1.1
Address = 10.13.199.65/24

[Peer]
PublicKey = L6ZGqvQqgQFkOxnB7u75WRtard6MBWjcBc3tdsfhdslfsjS0E=
AllowedIPs = 0.0.0.0/0
Endpoint = 192.252.675.767:1443
PersistentKeepalive = 25

Search the web for free vpn solutions. They do exist. But be aware of the limitations or gotchas - they may collect or sell data about your internet usage, they may be limited to low bandwidth connections, maybe only one device, etc.

1 Like

preciate the help man I don't have the money to get a vpn rn and you're right a free vpn probably wouldn't be the best way to go. thanks

1 Like

yea you're right I'm definitely going to wait till I have the money for a vpn.