Wireguard (off-topic)

yyea
114 Replies
Linux123123
Linux123123•4y ago
Ok You here?
zackie
zackieOP•4y ago
yep
Linux123123
Linux123123•4y ago
the china server can see the hk server fine?
zackie
zackieOP•4y ago
i guess? cuz im in china and im using vmess to route my traffic on to the hk server
Linux123123
Linux123123•4y ago
Yeah that is hard to do via ssh The hk server is running linux
zackie
zackieOP•4y ago
yes Operating system: Ubuntu 20.04 x86_64
Linux123123
Linux123123•4y ago
GitHub
GitHub - angristan/wireguard-install: WireGuard VPN installer for L...
WireGuard VPN installer for Linux servers. Contribute to angristan/wireguard-install development by creating an account on GitHub.
Linux123123
Linux123123•4y ago
This script should install it
zackie
zackieOP•4y ago
okay give me a second
Linux123123
Linux123123•4y ago
I am afraid that that script will fail too....
zackie
zackieOP•4y ago
why i think it worked
Linux123123
Linux123123•4y ago
Ok ok
zackie
zackieOP•4y ago
i mean hk doesnt have firewall like china
Linux123123
Linux123123•4y ago
oh yeah I am stupid at the end it should give a conf file
zackie
zackieOP•4y ago
it ask me a bunch of things do i just press enter
Linux123123
Linux123123•4y ago
Yeah that's good
zackie
zackieOP•4y ago
okay it gives me a qr code and a config file
Linux123123
Linux123123•4y ago
You will need the config
zackie
zackieOP•4y ago
i have it
Linux123123
Linux123123•4y ago
sudo apt install wireguard on the china server
zackie
zackieOP•4y ago
okay done
Linux123123
Linux123123•4y ago
Ok you need to copy that config to a file called wg0.conf on the china server
zackie
zackieOP•4y ago
under root?
Linux123123
Linux123123•4y ago
yeah
zackie
zackieOP•4y ago
okay done
Linux123123
Linux123123•4y ago
nmcli gives stuff back correct?
zackie
zackieOP•4y ago
its not installed give me a sec
Linux123123
Linux123123•4y ago
uhm then don't
zackie
zackieOP•4y ago
dont install it?
Linux123123
Linux123123•4y ago
Because your server is using something different then networkmanager Maybe netplan
zackie
zackieOP•4y ago
netplan works
Linux123123
Linux123123•4y ago
ok I need to think up a netplan config then
zackie
zackieOP•4y ago
okay thank you so much do u need the .conf file?
Linux123123
Linux123123•4y ago
ls /etc/netplan are there any files there
zackie
zackieOP•4y ago
01-netcfg.yaml
Linux123123
Linux123123•4y ago
cat /etc/netplan/01-netcfg.yaml give it
zackie
zackieOP•4y ago
This file describes the network interfaces available on your system For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: enp5s0f0: dhcp4: no addresses: [103.222.188.116/24,10.222.188.116/24] gateway4: 103.222.188.254
Linux123123
Linux123123•4y ago
Oh wait does wq-quick work
zackie
zackieOP•4y ago
wq-quick: command not found
Linux123123
Linux123123•4y ago
and just wg
zackie
zackieOP•4y ago
it doesnt give anything
Linux123123
Linux123123•4y ago
and how about installing wireguard-tools? sudo apt install wireguard-tools
zackie
zackieOP•4y ago
No description
Linux123123
Linux123123•4y ago
Is there a directory /etc/wireguard?
zackie
zackieOP•4y ago
yes
Linux123123
Linux123123•4y ago
Ok 🙂 copy that config into their
zackie
zackieOP•4y ago
okay done
Linux123123
Linux123123•4y ago
sudo wg-quick up wg0 this will not work?
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
gives this
Linux123123
Linux123123•4y ago
oh a common problem wait
zackie
zackieOP•4y ago
okay
Linux123123
Linux123123•4y ago
ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf and run again
zackie
zackieOP•4y ago
still gives the same thing
zackie
zackieOP•4y ago
like this
No description
Linux123123
Linux123123•4y ago
sudo apt install openresolv
zackie
zackieOP•4y ago
hmm
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
why is this even banned wtf
Linux123123
Linux123123•4y ago
Nah it's the wireguard maybe reboot?
zackie
zackieOP•4y ago
okay okay installed
Linux123123
Linux123123•4y ago
resolvectl works?
zackie
zackieOP•4y ago
resolvectl: command not found
Linux123123
Linux123123•4y ago
sudo apt install resolvconf
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
hmm
Linux123123
Linux123123•4y ago
hmmmmmnn sudo systemctl disable wq-quick@wg works?
zackie
zackieOP•4y ago
i cant ping archive.ubuntu.com Failed to disable unit: Unit file [email protected] does not exist. i cant ping archive.ubuntu.com on my computer with vpn turned off too so i think china bans it?
Linux123123
Linux123123•4y ago
Uhmmm maybe does china have ubuntu mirrors?
zackie
zackieOP•4y ago
i think i have tsinghua mirror on this let me check yes i have tsinghua university mirror but it wont use it
Linux123123
Linux123123•4y ago
you need main
zackie
zackieOP•4y ago
whats main
Linux123123
Linux123123•4y ago
apt update
zackie
zackieOP•4y ago
i think i did that before but ill do it again
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
umm idk why does this happen
Linux123123
Linux123123•4y ago
Well does mirrors are def blocked then
zackie
zackieOP•4y ago
.......why i hate china
Linux123123
Linux123123•4y ago
well who doesn't hate it
zackie
zackieOP•4y ago
yea true is there any way i can install it from offline package or something idk
Linux123123
Linux123123•4y ago
Yeah a deb
zackie
zackieOP•4y ago
how can i do that
Linux123123
Linux123123•4y ago
Is there any way for you to use ubuntu 18.04 or 20.04?
zackie
zackieOP•4y ago
i am on ubuntu 18.04
Linux123123
Linux123123•4y ago
xenial is 16.04
zackie
zackieOP•4y ago
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-153-generic x86_64)
Linux123123
Linux123123•4y ago
in the ubuntu mirrors
zackie
zackieOP•4y ago
but the thing says im on 18.04 wait but if im on 16.04 the script wont work right?
Linux123123
Linux123123•4y ago
Yeah
zackie
zackieOP•4y ago
is the system broken
Linux123123
Linux123123•4y ago
I am not too sure nothing I told you to do has changed the mirrors so that must have been like that already
zackie
zackieOP•4y ago
i change mirror every time if the server is in china
Linux123123
Linux123123•4y ago
hmmmnn then maybe instead of bionic you wrote xenial?
zackie
zackieOP•4y ago
ohhhhhhhhhhhhhhhhhhhhhhhhhh im too stupid its been xenial the whole time i can install resolvconf now
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
is this what it supposed to give? but i cant do anything else with this
Linux123123
Linux123123•4y ago
another ssh session curl your ip
zackie
zackieOP•4y ago
i cant connect to it anymore
Linux123123
Linux123123•4y ago
and the exsisting seession?
zackie
zackieOP•4y ago
the existing one works fine but i cant make any new ssh connection umm the existing one got disconnected too and i cant connect to it anymore
zackie
zackieOP•4y ago
No description
zackie
zackieOP•4y ago
No description
Linux123123
Linux123123•4y ago
restart server?
zackie
zackieOP•4y ago
okay server provider is not replying i think i would have to restart it tomorrow :(
Linux123123
Linux123123•4y ago
yeah it is kinda hard I am not usre if it will work
zackie
zackieOP•4y ago
why not what should i do after server reboot cant do sudo wg-quick up wg0 again right
Linux123123
Linux123123•4y ago
No, it will be the same as before again
zackie
zackieOP•4y ago
what should i do
Linux123123
Linux123123•4y ago
I am not too sure. When wireguard connects it drops your connection via normal public IP.
zackie
zackieOP•4y ago
um so if i connect so the port set on the hk server will it connect to the china server? idk
Linux123123
Linux123123•4y ago
It may be possible for you to ssh to the china server from hk server wg ip.
zackie
zackieOP•4y ago
yea thats what im saying ill try
Linux123123
Linux123123•4y ago
But be careful bcs you will maybe need to reboot again
zackie
zackieOP•4y ago
okay

Did you find this page helpful?