This is a fresh copy of ubuntu on my nVidia Jetson Nano, and I am trying to add the following rule to block network access for user 1001.
sudo iptables -A OUTPUT ! -o lo -m owner --uid-owner 1001 -j DROP
I get the following error:
iptables: No chain/target/match by that name.
Here is what I tried that works(YES) and does not work(NOT)
- YES - Remove the match criteria and replace with some other condition like source or target
- YES - On another similar installation on raspberry pi
- NOT - Change chain or target to INPUT or ACCEPT etc…
- NOT - Use a different user
- NOT - Try using user names instead of user ID
- NOT - Try a different match like --gid-owner
- NOT - Flushing the tables, restarting the PC etc
- NOT - Removed the
! -o lofrom the command above
This is beyond me, I really have tried a lot of things and read through a number of posts with the same error - most of the times they are trying to do something complex - yet this is simple and works on my similar raspberry pi install.
After research it seems the match extension is somehow broken. But I am not sure how to check. This seems specific to this build of Ubuntu.
EDIT: See below - some standard ubuntu config files I am looking for are also missing from this install, like boot/config-