Problem in running Iptables commands from CGI ?
This is because , CGI not having root privileges even though you are login as root or Admin.
To run root privileges commands through CGI .
Step:
If you run sudo it will not support.So alter sudoers file and restarted apache.
step 1: Run root commands like iptables from front end
ReplyDeletestep 2:check error_log file in apache server
it will show permission denied (you are not root)....
step 3:Try iptables with sudo command
step 4:Again check error_log
if it shows
"sudo: sorry, you must have a tty to run sudo, referer:..."
step 5:goto /etc then edit sudoers using visudo
and comment the line #Defaults requiretty
step 6:Restart apache using
#./apachectl -k restart
Good luck