Some programs are necessary to Firewal Admin:
Apache with PHP 4 support
Command line programs like iptables, iptables-save e iptables-restore
sudo program to run iptables from apache as root
1. Finding iptables binaries
Run all commands below to determite absolute path:
updatedb
locate iptables*
/sbin/iptables
/sbin/iptables-save
/sbin/iptables-restore
now make a backup copy of originals "JUST IN CASE"
cd /sbin
cp iptables iptables-org
cp iptables-save iptables-save-org
cp iptables-restore iptables-restore-org
Sudo configuration
First you'll need to discover what user runs apache, example:
[root@ftp root]# ps aux | egrep "(httpd|apache)"
root 2016 0.0 0.4 5884 2416 ? S 21:06 0:00 /usr/sbin/httpd-a
admin 2825 0.0 0.4 5884 2424 ? S 21:17 0:00 /usr/sbin/httpd-a
root 2938 0.0 1.3 80760 6824 ? S 21:17 0:00 httpd
www 2941 0.0 1.3 80772 6908 ? S 21:17 0:00 httpd
www 2942 0.0 1.3 80880 7032 ? S 21:17 0:00 httpd
www 2943 0.0 1.3 80872 7056 ? S 21:17 0:00 httpd
www 2944 0.0 1.3 80872 7052 ? S 21:17 0:00 httpd
www 2945 0.0 1.3 80880 7088 ? S 21:17 0:00 httpd
www 2946 0.0 1.3 80760 6828 ? S 21:17 0:00 httpd
www 2947 0.0 1.3 80760 6828 ? S 21:17 0:00 httpd
www 2948 0.0 1.3 80760 6828 ? S 21:17 0:00 httpd
www 2949 0.0 1.3 80760 6828 ? S 21:17 0:00 httpd
www 2950 0.0 1.3 80760 6828 ? S 21:17 0:00 httpd
Apache is executed in sme6.x systems by www
mkdir /etc/e-smith/templates-custom/etc/ "it may already exist"
mkdir /etc/e-smith/templates-custom/etc/sudoers/
cp /etc/e-smith/templates/etc/sudoers/* /etc/e-smith/templates-custom/etc/sudoers/
edit /etc/e-smith/templates-custom/etc/sudoers/10root
add the following below any current entries:
www ALL=NOPASSWD: /sbin/iptables
www ALL=NOPASSWD: /sbin/iptables-save
www ALL=NOPASSWD: /sbin/iptables-restore
save and exit
expand template:
----------------
/sbin/e-smith/expand-template /etc/sudoers
/sbin/e-smith/signal-event console-save
/sbin/e-smith/signal-event reboot
wget -N
http://internap.dl.sourceforge.net/sourceforge/firewalladmin/firewalladmin-0.4.tar.gzwget -N
http://firewalladmin.sourceforge.net/lang/firewalladmin-site-lang.tar.gzInstalling Firewall Admin
Unpack Firewal Admin tarballs
Create an ibay called fwadmin with php support
Information bay name: fwadmin
Description: Firewall Admin for iptables
Group: Admin
User access via file sharing or user ftp: Write = admin, Read = Group
Public access via web or anonymous ftp: No access
Execution of dynamic content (CGI, PHP, SSI): enabled
tar -xzf firewalladmin-0.4.tar.gz
mv firewalladmin-0.4/* /home/e-smith/files/ibays/fwadmin/html
tar -xzf firewalladmin-site-lang.tar.gz
mv lang-en.php /home/e-smith/files/ibays/fwadmin/html
Change write permissions of config.php to all (chmod a+w config.php)
delete or rename index.html
Setting up Firewall Admin
Put your browser to url where Firewall Admin was installed
https://yourserver/fwadmin and choose Config to finish configuration process.
USE AT YOR OWN RISK !!!!
Have not tried this on SME 7