Answer the question
In order to leave comments, you need to log in
Why is there no Wireguard VPN ping?
Server
[Interface]
Address = 10.9.0.1/24
PrivateKey =
ListenPort = 51820
[Peer]
PublicKey =
AllowedIPs = 10.9.0.2/32
[Interface]
PrivateKey =
Address = 10.9.0.2/24
[Peer]
PublicKey =
AllowedIPs = 0.0.0.0/0
Endpoint = 192.168.19.97:51820
PersistentKeepalive = 25
sudo wg-quick up /etc/wireguard/wg0.conf
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.9.0.1/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[email protected]:~$ sudo wg-quick up /etc/wireguard/wg0.conf
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.9.0.2/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] 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
interface: wg0
public key:
private key: (hidden)
listening port: 51820
peer:
endpoint: 192.168.19.98:35280
allowed ips: 10.9.0.2/32
latest handshake: 1 minute, 24 seconds ago
transfer: 180 B received, 92 B sent
sudo wg
interface: wg0
public key:
private key: (hidden)
listening port: 35280
fwmark: 0xca6c
peer:
endpoint: 192.168.19.97:51820
allowed ips: 0.0.0.0/0
latest handshake: 2 minutes, 41 seconds ago
transfer: 92 B received, 8.05 KiB sent
persistent keepalive: every 25 seconds
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.19.254 0.0.0.0 UG 100 0 0 ens33
10.9.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wg0
192.168.19.0 0.0.0.0 255.255.255.0 U 0 0 0 ens33
192.168.19.254 0.0.0.0 255.255.255.255 UH 100 0 0 ens33
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.19.254 0.0.0.0 UG 100 0 0 enp0s3
10.9.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wg0
192.168.19.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
192.168.19.254 0.0.0.0 255.255.255.255 UH 100 0 0 enp0s3
ping 10.9.0.1
PING 10.9.0.1 (10.9.0.1) 56(84) bytes of data.
IP сервера 192.168.19.97 (Wireguard 10.9.0.1)
IP клиента 192.168.19.98 ( Wireguard 10.9.0.2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question