RamonGiovane / guiptables

A Graphic User Interface for Linux's Iptables Firewall. Made with Cockpit for CentOS
GNU Lesser General Public License v2.1
25 stars 4 forks source link

Supportting other distros #9

Open RamonGiovane opened 7 months ago

RamonGiovane commented 7 months ago

I've tested Cockpit on non-RHEL-like systems and it works very well. So as long as Cockpit is running in a distro and it has iptables, I think guiptables is good to go.

The problem comes when we need to install iptables within guiptables, as RHEL-like systems use yum and other distros has different package mangers. For this I can think in two options:

  1. Supportting other package managers. This would be the most complex way. I was thinking about allowing the user to pass the desired package manager name in settings.json and then the code identifies the right command to call. A release .deb package would have aptconfigured by default, and so on... But on second tought, I don't know if it's worth the effort. There's currently no other task to package managers here besides installing iptables if it's not installed.
  2. Dropping the option to install Iptables for non RHEL-like systems and show error on the current widget.

That is the only code related thing I see that would impact supporting other distros. Besides that, the really challenge would be writing the scripts to create release packages. From my experience with .rpms, it wasn't as easy how I thought it would be.

bambosd commented 5 months ago

Hello Ramon, i'm trying to have guiptables on cockpit on a debian 12 bookworm system. is there any workaround to have it functioning ? Even if a add the backports repository there is no guiptables package.

Do you think will work if i enable yum packages on debian and reinstall everything from yum repositories ? any suggestions appreciated.

RamonGiovane commented 5 months ago

Hello Ramon, i'm trying to have guiptables on cockpit on a debian 12 bookworm system. is there any workaround to have it functioning ? Even if a add the backports repository there is no guiptables package.

Do you think will work if i enable yum packages on debian and reinstall everything from yum repositories ? any suggestions appreciated.

Hi. Have you tried the second method of installation described on READ ME?

You can basically install Cockpit  then download guiptables source code and place it inside the Cockpit plugins directory.

https://github.com/RamonGiovane/guiptables?tab=readme-ov-file#using-the-source-code

bambosd commented 5 months ago

This is the steps i have followed to have step by step setup on Debian 12. Please publish on your next documentation.

sudo apt install iptables sudo apt install git sudo git clone https://github.com/RamonGiovane/guiptables.git sudo cp -r guiptables/ /usr/share/cockpit/

Since iptables require root login: system change:

sudo nano /etc/ssh/sshd_config In the configuration file, find the line that says PermitRootLogin and change it to yes. This action allows the root user to log in via SSH. sudo systemctl restart ssh

cockpit change:

Root login disabled by /etc/cockpit/disallowed-users, so if you want to allow root login you will need to remove the root entry from that file

Navigate to : https://systemip:9090/ and login as root. You should have iptables menu on the left. image

RamonGiovane commented 1 month ago

Version 1.4 now supports access for non root users. https://github.com/RamonGiovane/guiptables/releases/tag/1.4.0