OpenWrt
configure wireguard
Create VPN server with WireGuard https://www.youtube.com/watch?v=6NIJcsJsRaM
- Install packages:
wireguard-tools luci-proto-wireguard kmod-wireguard (should be installed automatically)
- ssh to router
$ mkdir /etc/wireguard
$ umask ..
Generate public & private keys
Network-> interfaces Add new interface wg0
Add peers
Configure firewall Network->Firewall Add PortForwarding
reboot
Check Status->Wireguard tab
Configure client
Generate public & private keys
create
wg0.conf
file
[Interface]
Address = 10.8.0.2/32
PrivateKey = ...
DNS = 8.8.8.8
[Peer]
PublicKey = ...
Endpoint = ISP_PUBLIC_IP_ADDRESS:51820
#
# Forward all trafic through the VPN,
# IP address will be VPN
# Access local resources like 192.168.1.1/24 ..
#
AllowedIPs = 0.0.0.0/0
#
# Access only router
#
#AllowedIPs = 10.8.0.0/24
PersistentKeepalive = 15
systemctl enable wg-quick@wg0
To stop/start:
systemctl stop wg-quick@wg0
systemctl start wg-quick@wg0
Interfaces
Firewall settings
General settings
Network port forwarding
Peers configuration