Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Can not edit config to run on port 53? (function get_free_udp_port) #29

Open
ishmumx opened this issue Mar 21, 2019 · 9 comments
Open

Comments

@ishmumx
Copy link

ishmumx commented Mar 21, 2019

I edited the portion of the code to give me 53 for a random lookup so my final config has port 53 in it:

function get_free_udp_port { local port=$(shuf -i 053-053 -n 1) ss -lau | grep $port > /dev/null if [[ $? == 1 ]] ; then echo "$port"

also tried

function get_free_udp_port { local port=$(shuf -i 053-053 -n 1) ss -lau | grep $port > /dev/null if [[ $? == 1 ]] ; then echo "53"

And none of this works. In the end, I end up with this:

Try `iptables -h' or 'iptables --help' for more information.
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.service.
Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xe" for details.
Client config --> /root/client-wg0.conf
Now reboot the server and enjoy your fresh VPN installation! :^)

Can someone help so I can install wireguard to Port 53? Seems like if I replace it with a 3 digit number, it works (053 doesn't work I tried)

@l-n-s
Copy link
Owner

l-n-s commented Mar 21, 2019

You can make it easier, run it with environment variable SERVER_PORT=53

SERVER_PORT=53 bash wireguard-install.sh

@ishmumx
Copy link
Author

ishmumx commented Mar 21, 2019

Unfortunately that did not work either.

Result is the same:

net.ipv4.ip_forward = 1
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 1
Created symlink /etc/systemd/system/multi-user.ta
rget.wants/wg-quick@wg0.service → /lib/systemd/sy
stem/wg-quick@.service.
Job for wg-quick@wg0.service failed because the c
ontrol process exited with error code.
See "systemctl status wg-quick@wg0.service" and
"journalctl -xe" for details.
Client config --> /root/client-wg0.conf
Now reboot the server and enjoy your fresh VPN in
stallation! :^)
root@WireguardP500:~#

@ishmumx ishmumx closed this as completed Mar 21, 2019
@ishmumx ishmumx reopened this Mar 21, 2019
@l-n-s
Copy link
Owner

l-n-s commented Mar 21, 2019

See "systemctl status wg-quick@wg0.service" and
"journalctl -xe" for details.

@ishmumx
Copy link
Author

ishmumx commented Mar 21, 2019

Result of the first command:

root@WireguardP500:~# systemctl status wg-quick@w
g0.service
wg-quick@wg0.service - WireGuard via wg-quick(8
Loaded: loaded (/lib/systemd/system/wg-quick@.
Active: failed (Result: exit-code) since Thu 2
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/WireGuard/about/
https://git.zx2c4.com/WireGuard/about/
Process: 740 ExecStart=/usr/bin/wg-quick up wg0
Main PID: 740 (code=exited, status=2)

Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: RTNE
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
lines 1-18...skipping...
wg-quick@wg0.service - WireGuard via wg-quick(8
Loaded: loaded (/lib/systemd/system/wg-quick@.
Active: failed (Result: exit-code) since Thu 2
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/WireGuard/about/
https://git.zx2c4.com/WireGuard/about/
Process: 740 ExecStart=/usr/bin/wg-quick up wg0
Main PID: 740 (code=exited, status=2)

Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 wg-quick[740]: RTNE
Mar 21 08:58:41 WireguardP500 wg-quick[740]: [#]
Mar 21 08:58:41 WireguardP500 systemd[1]: wg-quic
wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-03-21 08:58:41 PDT; 51min ago
Docs: man:wg-quick(8)
man:wg(8)

@ishmumx
Copy link
Author

ishmumx commented Mar 21, 2019

Second command:

root@WireguardP500:~# journalctl -xe
Mar 21 09:49:33 WireguardP500 systemd[1226]: Star
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- The user manager instance for user 0 has been
-- for starting have been started. Note that othe
-- up or be started at any later time.

-- Startup of the manager took 38109 microseconds
Mar 21 09:49:33 WireguardP500 systemd[1]: Started
-- Subject: Unit user@0.service has finished star
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- Unit user@0.service has finished starting up.

-- The start-up result is done

.

@ishmumx
Copy link
Author

ishmumx commented Mar 26, 2019

@l-n-s any comment on this? You can try with any Debian Distro and it will show this.

@l-n-s
Copy link
Owner

l-n-s commented Mar 26, 2019

My Debian machine works fine.

Have you tried to do a clean install? Either uninstall everything and remove all the config files (if you can). Or reinstall the OS.

@ishmumx
Copy link
Author

ishmumx commented Mar 26, 2019

My Debian machine works fine.

Have you tried to do a clean install? Either uninstall everything and remove all the config files (if you can). Or reinstall the OS.

Yes I have. Brand new Debian 9.0 and 9.8

Repository owner deleted a comment Mar 29, 2019
Repository owner deleted a comment Mar 29, 2019
Repository owner deleted a comment Mar 29, 2019
@ishmumx
Copy link
Author

ishmumx commented Apr 15, 2019

Still not working unfortunately. I tried on AWS, GCP and Bare metal servers. Port 53 is a no go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants