My setup requires a HTTP server listening on a specific IP address, through an OpenVPN connection. To implement the server, I use python 3.11 with the library aiohttp under Ubuntu 22.04. The issue is that, requests sent to that server are not picked up by it, even though my machine receives the packet correctly (I've checked this through Wireshark). Instead, when running the same server through the same OpenVPN connection under Windows (or just Ubuntu 24), this issue does not arise and the packet is correctly handled by the HTTP server. This same behaviour applies also with another protocol, like CoAP. At this point, I believe the Linux network stack is doing something wrong. Is there a possible fix for Ubuntu 22?
The output of ifconfig
for the VPN interface is the following:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.0.3.6 netmask 255.255.255.255 destination 10.0.3.5
inet6 fe80::1935:7dee:341:eaa8 prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500
The server listens to the address 10.0.3.6
The Ubuntu firewall on Ubuntu 22 was blocking the requests at the OS level (hence why Wireshark detected them). I had to disable it altogether with sudo ufw disable
, no rules allowed packets through somehow