Skip to content
Contents
GuidesOpenWrt

WireGuard logs Invalid IP packet on OpenWrt. Which end should you check?

Start with traffic entering the local wg interface. Linux 6.6.86 prints wireguard: wg: Invalid IP packet on transmit. That line alone cannot identify a bad packet arriving from the internet.

Start with traffic entering the local wg interface. Linux 6.6.86 prints wireguard: wg: Invalid IP packet on transmit. That line alone cannot identify a bad packet arriving from the internet.

Match the exact message

Find the interface in the LuCI system log. Check uname -r. For a custom OpenWrt 24.10.1 build, also search the patched kernel tree. The check below runs before peer selection. If the message says No peer has allowed IPs matching, check the destination prefix instead.

grep -n 'Invalid IP packet' drivers/net/wireguard/device.c

Linux 6.6.86 · wg_xmit · Invalid IP packet

Linux 6.6.86 · device.c · wg_xmit · © 2015–2019 Jason A. Donenfeld · GPL-2.0

Compare one request with TX errors

Replace wg with the logged name. Record TX errors and each peer’s byte counts twice while idle. Run logread -f in a second SSH window, access a permitted service through the tunnel from one client and read the counters again. Stop with Ctrl+C. Rate limiting makes log lines unreliable as a packet count.

ip -s link show dev wg
wg show wg transfer

Change one thing you can reproduce

If service works and counters stay flat, leave the configuration alone. If errors rise only with one program, pause it on a test copy, restore it and repeat. Check that it submits valid IPv4 or IPv6 packets, especially if it injects Ethernet frames. If all clients fail, run ip route get with the real destination and check the outgoing interface and peer.

Keep a change only if the same request succeeds without fresh matching errors. Otherwise revert it. Other faults also raise TX errors. Mask addresses and keys before sharing logs.

How to route your home through WireGuard on OpenWrt and verify the egress IP

Explore hardware

Comments