Ufw needs restarts after each reboot

Hello,

TRrying the new forums :slight_smile:

I get a strange issue : when I have to reboot the emonpi, specific tcp ports (for mqtt and a custom socket interfacer for instance) are not opened, although “ufw status” show proper ports set to “ALLOW”. Any incoming packet gets dropped (appart from 80, 443 and 22). I have to run"rpi-rw", “ufw restart” and “rpi-ro” to get ports to be effectively opened.

Any one experienced this ?

Thanks.
JS

JS - Sorry I don’t have an answer but I may be able to point you in the right direction. I think you are looking for iptable persistence. Take a look at this OEM blog emonPi, NodeRed and MQTT in the section titled Install Node-RED on emonPi / emonHub / Raspberry Pi.

What emonSD image version are you running?

ls /boot | grep emonSD

No problems have been reported with ufw on the latest emonSD-03May16.

Hello Jon,

Thanks for that. But I’m actually using ufw (uncomplicated Firewall) as it is already installed. It should make config persistent !

Regards.
JS

Hello Glynn,

Hmmmmm, I don’t have any emonSD file in /boot… barely an emonpi-28May2015…
Is there an “upgrade path” ? Can I backup all config and data and build a new SD ?

I now even get an excuse to change for an RPi 3 :slight_smile:

Thanks.
JS

Where did the image your running come from? Did you built it yourself or is it one of our early images? If so this is strange since we only started using UFW in recent image builds. What Emoncms version are you running (see Emoncms footer).

Yes, you can use the emonPi backup / import module to migrate your data. Running an emonPi update should install the backup module. If you are running a very old image (older that May15) then you might need to manually install the backup module to generate a backup zip with your data. Importing into the latest image is then straightforward. See user guide :

https://guide.openenergymonitor.org/setup/import/

Hello Glyn,

I got my emonpi from Kickstarter campaign. I am running vlow-write-v8.5.

And thinking about it… I may have installed ufw myself after installing node-red or setup the socket interfacer… :confused:

I do have the backup module (never noticed it before) so I’ll do a backup and upgrade to the latest image :slight_smile:

Thanks.

PS : Strangely enough, I did not receive mail notification for your update. Is there an issue with the new forum ?

This is because it was recently installed as part of a recent emonPi update :slight_smile: . We have been trying to make it as easy as possible for users to migrate to the new image. Once you have the new image running you should be able to follow the guide:

https://guide.openenergymonitor.org/setup/import/