Home > Backend Development > PHP Tutorial > 防火墙-php如何让程序后台运行

防火墙-php如何让程序后台运行

WBOY
Release: 2016-06-02 11:34:36
Original
958 people have browsed it

防火墙php后台运行iptables

下面的代码是先让别人手机的能够访问网络,但是我想通过nohup在60分钟后将防火墙内的记录删除,以达到别人每60分钟必须重新连接一次网络。
$iipp=$_SERVER["REMOTE_ADDR"];
exec ("iptables -t nat -I PREROUTING -s $iipp -j ACCEPT");
exec ("nohup sleep 60m >/dev/null 2>&1 &");
exec ("nohup iptables -t nat -D PREROUTING -s $iipp -j ACCEPT > /dev/null 2>&1 &");
?>

但是现在的问题是,nohup没有起作用,防火墙不能再制定时间后自动删除记录,我现在是个小菜鸟,求各路大神帮帮忙啊!小弟感激不尽啊!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template