I run several versions of CentOS in virtual machines. Recently I downloaded the 6.6 ISO image (minimal edition) and after installing it & the ‘firewall-tui’ package (since it is not included by default in the ‘minimal’ edition), while trying to run it, ‘firewall-tui’ gave me an error and quit.
Now of course you can deal with the firewall strictly through the command-line interface, but I sometimes find it convenient to use a basic GUI (‘ncurses’ to be precise). So I had a quick look at the error and found a simple solution that fixed the issue 🙂 . All you have to do is comment out a certain line.
But please remember that, I am not a programmer, therefore I do not know if this is a code that should necessarily be there (it is not present in CentOS 6.5 however) that I am commenting out. So far so good though .
Step 1: To fix the situation, we have to edit a Python configuration file related to ‘firewall-tui’. For that, enter the below command and it will take you directly to the line where the issue is.
vi +34 /usr/share/system-config-firewall/fw_tui.py
Step 2: Now simply comment out the ‘import fw_nw’ code (by adding a # sign at its beginning) as shown in the below screenshot (if you’re new to ‘vi’, then press the ‘i’ key and then type it in).
Once done, save your changes and exit (press the ‘Esc’ key and then type ‘:wq’). That is it. Now try running the ‘firewall-tui’ and it should work. Good luck.