用cgi动态更改iptables规则
时间:2006-02-01 来源:ruiqingzheng
chmod 4711 /sbin/iptables chown .nobody /sbin/iptables |
2. 更改或添加一个apache用户
$apache/bin/htpasswd /usr/local/apache/conf/passwords juey |
3. 配置cgi需要验证
vi $apache/conf/httpd.conf
<Directory "/var/www/html/cgi-bin/">
AuthType Basic |
#!/bin/bash
echo "$REMOTE_ADDR" [ $? -eq 0 ] || /sbin/iptables -I INPUT -s $REMOTE_ADDR -p tcp --dport 4567 -j ACCEPT |
http://blog.iyi.cn/start/2005/12/post_98.html
<HTML>
</BODY> |