complexorganizations/wireguard-manager

How to get client up by command on ubuntu?

alexlii1971 opened this issue · 1 comments

Hello,

I already setup a wireguard server on Digitialoean in US.

and now, we have a server in China with Ubunutu, and I want to setup Wireguard VPN client so that this server in China can access to the global resource.

So, how to setup a wireguard client on this server in China and get it up by command line?

Any tools or tutorials will be apprecatied.

Hello,

Here is what I test:

1# On Wireguard server of DIgitalocean in US, I tried your scripts:

curl https://raw.githubusercontent.com/complexorganizations/wireguard-manager/main/wireguard-manager.sh --create-dirs -o /usr/local/bin/wireguard-manager.sh
chmod +x /usr/local/bin/wireguard-manager.sh
bash /usr/local/bin/wireguard-manager.sh

Then, create new client named as "clientforchina"

2. On server in China:

Run sudo apt-get install wireguard
Run wg genkey |tee private.key |wg pubkey > public.key
Run sudo nano /etc/wireguard/wg0.conf

Then, put the "clientforchina" into wg0.conf

Then, run sudo wg-quick up wg0

On the dashboard of server provider, I noted it succeed to connect to the server of Digitalocean in US.

3. But, I will lost connect to the server in China by SSH.

Any solution to reosolve the issue?