I have a server(10.42.0.1) and a client(10.42.0.2), both with wg
. I've configured both using the wg
command in a way that they should be able to talk to each other.
client wg
:
interface: wg0
public key: abc123=
private key: (hidden)
listening port: 51820
peer: xyz987=
endpoint: 15.14.13.12:51820
allowed ips: 10.42.0.0/24
transfer: 0 B received, 7.37 KiB sent
server wg
:
interface: wg0
public key: xyz987=
private key: (hidden)
listening port: 51820
peer: abc123=
allowed ips: 10.42.0.0/24
However(as you might be able to see already), my server is totally oblivious to my client. Pinging from the client and running tcpdump -i wg0
on the server logs no traffic.
Client ping
:
PING 10.42.0.1 (10.42.0.1) 56(84) bytes of data.
^C
--- 10.42.0.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4046ms
Server tcpdump -i wg0
:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wg0, link-type RAW (Raw IP), capture size 262144 bytes
0 packets captured
0 packets received by filter
0 packets dropped by kernel
Trying to ping the client from the server results in ping: sendmsg: Destination address required
, but that is to be expected since there is no endpoint specified for the client.
The firewall should not be getting in the way, that said I'm not an expert on iptables
.
Server iptables -L
:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
ACCEPT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I know opening all the ports on my server is dangerous, but I'll fix it when I can get WireGuard working. I'm hoping that the fix to my problem is something easy that I'm looking over, but I've tried everything that the google machine has to offer and nothing is working.