To use wireguard as a client, first, we need to get the wireguard configuration file from the provider. It will come with .conf naming convention.
Once we have that, we need to install wireguard package together with resolvconf
$ sudo apt install wireguard resolvconf -y
Then, put the wireguard configuration file into /etc/wireguard
$ sudo mv mywireguard.conf /etc/wireguard
We are now able to use wireguard and connect to the wireguard server. Use below command to setup wireguard interface using the above configuration
$ sudo wg-quick up mywireguard
An interface will be created with the same name
$ sudo ip link dev show mywireguard8: mywireguard: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000link/none
We should now be able to connect to any host inside the wireguard server's network.
To turn off wireguard, simply use below command
$ sudo wg-quick down mywireguard
No comments:
Post a Comment