Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 9496  / 2 Years ago, sat, april 9, 2022, 1:57:57

I'm trying out Wireguard VPN, and although I believe that I've finally got it to connect, I have no Internet access, and can't ping various sites on the Internet.


I took a Wireguard .conf file provided by my VPN vendor, renamed it, and copied it to /etc/wireguard/wg0.conf.


[Interface]
PrivateKey = redacted
ListenPort = 51820
Address = redacted/32
DNS = 10.100.0.1

[Peer]
PublicKey = redacted
PresharedKey = redacted
AllowedIPs = 0.0.0.0/0
Endpoint = redacted:51820
PersistentKeepalive = 25

If I do sudo wg-quick up wg0 it appears to connect, but I have no Internet access.


$ sudo wg-quick up wg0


[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add redacted/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n

$ sudo wg show


interface: wg0
public key: redacted
private key: (hidden)
listening port: 51820
fwmark: 0xca6c

peer: redacted
preshared key: (hidden)
endpoint: redacted:51820
allowed ips: 0.0.0.0/0
transfer: 0 B received, 2.89 KiB sent
persistent keepalive: every 25 seconds

I've tried disabling the firewall with no luck. I've tried sysctl -w net.ipv4.ip_forward=1 with no luck.


Any ideas why no Internet?


More From » vpn

 Answers
5

I obtained a new wireguard .conf file from my VPN vendor, using a different (correct) peer hostname, and my initial testing indicates that it's working now.


[#691] Saturday, April 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atelti

Total Points: 194
Total Questions: 129
Total Answers: 110

Location: North Korea
Member since Tue, Jun 16, 2020
4 Years ago
atelti questions
;