在Ubuntu服务器14.04上,通过使用选中的答案,我启用了ufw端口从80转发到8181(tcp) 我可以使用ufw来设置端口转发吗?
最后我宁愿使用apache2代理function代理http请求。 所以我删除了添加的行到/etc/ufw/before.rules,然后禁用/重新启用ufw。
端口转发仍然是活动的。 任何想法 ?
提前致谢。
编辑
简单的重启就足够了。 我的猜测是它清除了iptables。 所以现在我的问题是:如何在不重新启动的情况下完成这个任务?
通过冲刷NAT表中的链并去除任何子链:
ufw disable iptables --table nat --flush iptables --table nat --delete-chain ufw enable
短期选项:– --table|-t , --delete-chain|-X --table|-t --delete-chain|-X