如果vps不能访问 raw.githubusercontent.com 推荐使用这个

wget --no-check-certificate -qO natcfg.sh http://www.arloor.com/sh/iptablesUtils/natcfg.sh && bash natcfg.sh

或者

wget --no-check-certificate -qO natcfg.sh https://raw.githubusercontent.com/arloor/iptablesUtils/master/natcfg.sh && bash natcfg.sh

输出如下:

你要做什么呢(请输入数字)?Ctrl+C 退出本脚本
1) 增加转发规则 3) 列出所有转发规则
2) 删除转发规则 4) 查看当前iptables配置

?

卸载

wget --no-check-certificate -qO uninstall.sh https://raw.githubusercontent.com/arloor/iptablesUtils/master/dnat-uninstall.sh && bash uninstall.sh

ptables的后继者nftables已经在debain和centos最新的操作系统中作为生产工具提供,nftables提供了很多新的特性,解决了iptables很多痛点。

因此创建了一个新的项目/arloor/nftables-nat-rust。该项目使用nftables作为nat转发实现,相比本项目具有如下优点:

支持端口段转发
转发规则使用配置文件,可以进行备份以及导入
更加现代
所以强烈推荐使用/arloor/nftables-nat-rust。不用担心,本项目依然可以正常稳定使用。

PS: 新旧两个项目并不兼容,切换到新项目时,请先卸载此项目

评论已关闭