0

I have all the newest software. Downloaded the official image yesterday.

apt-get upgrade
apt-get update
rpi-update
.....

rebooted, of course

Does not help.

root@raspberrypi:/home/pi# iptables --version iptables v1.8.2 (nf_tables)

I tried this: root@raspberrypi:/home/pi# iptables -L

Got this:

iptables: Operation not supported.

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables v1.8.2 (nf_tables): Chain 'MASQUERADE' does not exist
Try `iptables -h' or 'iptables --help' for more information.

I need masquerade to work how do I fix this.
This part of a raspberry pi 4 wifi ap setup.

I also get similar errors with nft.

Ended up with some file corruption, and the whole thing wouldn't boot.

Had to reflash the SD card.

Did another rpi-update

Everything was fine this time.

It is not possible to trouble shoot this further.

The question needs to be closed. I can't delete it.

1
  • > "In normal circumstances there is NEVER a need to run rpi-update as it always gets you to the leading edge firmware and kernel and because that may be a testing version it could leave your RPi unbootable". raspberrypi.org/forums/viewtopic.php?p=916911#p916911 Even the rpi-update documentation now warns "Even on Raspbian you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware." – Milliways Nov 18 '20 at 23:19
2

You are doing many things wrong. You have first to update the package list before upgrading them. Then you should better use apt full-upgrade instead of only simple apt upgrade.

rpi ~$ sudo apt update
rpi ~$ sudo apt full-upgrade

Then you use rpi-update that may leave an unstable operating system because its only for testing things under development. Please note this Q&A: Unstable rPi 4B after rpi-update.

On my Raspberry Pi 4B this command works without any problems:

rpi ~$ sudo /sbin/iptables --table nat --append POSTROUTING --out eth0 --jump MASQUERADE
rpi ~$ sudo /sbin/iptables --table nat --list POSTROUTING --verbose
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 MASQUERADE  all  --  any    eth0    anywhere             anywhere

I don't know what other things you have mixed up but I suggest to download the image again, verify its checksum and flash it to your SD Card again. Without doing any other things first verify that iptables is working as shown above.

3
  • I know dozen of people take rpi-update to be this crazy unstable thing, but its not. I have 5 pi over time, and have done it dozens if not hundreds of times and its never caused problems before.I have 3 other pi 4 that have been rpi-update and they don't have this issue. – cybernard May 11 '20 at 17:40
  • @cybernard If you know it better as official documented and 1,434 others having trouble with rpi-update then why you asking for troubleshooting? – Ingo May 11 '20 at 18:07
  • This is not a definitive list of people "having problems". I examined several pages of these questions and many dozens of these are just people asking about it. Asking questions about it does not count as a problem. – cybernard May 11 '20 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.