Cannot find ufw rules that will allow a USB Gadget internet access
I have a raspberry Pi Zero configured as a USB Gadget and it is working very well, except that when I have the ufw enabled on the host PC I cannot access the Internet from an SSH session to the USB Gadget.
My setup is as follows: I'm running Ubuntu 23.04 on an Intel NUC 10i5 and that PC has an IP address (DHCP assigned) in the range 192.168.87.xxx
I've followed the advice from https:/
The USB Gadget (Raspberry Pi Zero) is running Raspbian GNU/Linux 10 (buster) and it reports its IP address as 10.42.0.29
On the PC side the usb0 network interface has IP address 10.42.0.1
Regardless of whether ufw is enabled or disabled I can ping 10.42.0.1 and .29 and I can SSH to 10.42.0.29 from the host PC.
But there's no Internet connection from the SSH session to the USB Gadget if ufw is running on the host PC but there is a working Internet connection if ufw is disabled on the host PC
Currently I have these (default) rules on the host PC
$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
when I try to access the Internet from the USB Gadget when the ufw is enabled on the host PC I can on the PC see something like this:
$ sudo tail -f /var/log/ufw.log
2023-06-
I've tried adding many rules to ufw but I cannot simultaneously get Internet access from the USB Gadget and have an enabled ufw on the host PC. Any suggestions -- is it as simple as allowing routing -- and how is that done?
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply: