项目地址:https://github.com/arloor/iptablesUtils
1.项目作用
便捷地设置iptables流量转发规则
当域名解析的地址发生变化时,自动更新流量转发规则,不需要手动变更(适用于ddns域名)
2.用法
如果vps不能访问 raw.githubusercontent.com 推荐使用这个
bash <(curl -fsSL https://www.arloor.com/sh/iptablesUtils/natcfg.sh)
bash <(curl -fsSL https://raw.githubusercontent.com/arloor/iptablesUtils/master/natcfg.sh)
wget -qO natcfg.sh https://arloor.com/sh/iptablesUtils/natcfg.sh && bash natcfg.sh
输出如下:
此时按照需要,输入1-4中的任意数字,然后按照提示即可
3.卸载
wget --no-check-certificate -qO uninstall.sh https://raw.githubusercontent.com/arloor/iptablesUtils/master/dnat-uninstall.sh && bash uninstall.sh
4.查看日志
journalctl -exu dnat
5.配置文件备份和导入导出
配置文件在
/etc/dnat/conf
此处评论已关闭