Menu

Iptables-restore doesn't work with Webmin in Ubuntu 20.4

Webmin
Luca Zappi
2020-10-20
2020-10-20
  • Luca Zappi

    Luca Zappi - 2020-10-20

    Webmin version 1.960

    I just migrated a server from Ubuntu 18.4 to 20.4.
    Migration has been quite smoot, but iptables configuration was not correctly loaded at boot.

    The new version Ubuntu 20.4 puts iptables-restore command (symbolic link) under /usr/sbin/
    It was under /sbin/ in Ubuntu 18.4

    With no clear idea about procedure used by webmin to load iptables configuration at boot time, I only added a symbolic link to iptables-restore under /sbin/ directory. In such way iptables configuration is now loaded in the correct way at boot.

    Hope information can be usefull.
    Please replay if the same patch can be applied in such a better way.

     

    Last edit: Luca Zappi 2020-10-20
  • Ilia

    Ilia - 2020-10-20

    It looks that /usr/sbin is not on the path?

    What do you have set in Webmin Configuration > Operating System and Environment
    set? Do you have Include system's own search path? enabled?

     
  • Luca Zappi

    Luca Zappi - 2020-10-20

    Just checked, following result:

    # echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
    

    Operating System and Environment setting is OK, here is evidence.

    Often complete path of commands is hard coded into script in order to be indipendent from environment. Is that an option?

     

    Last edit: Luca Zappi 2020-10-20

Log in to post a comment.