iptables中转脚本

 

项目作用

  1. 便捷地设置iptables流量转发规则
  2. 当域名解析的地址发生变化时,自动更新流量转发规则,不需要手动变更(适用于ddns域名)

用法

# 如果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)

输出如下:

#############################################################
# Usage: setup iptables nat rules for domian/ip             #
# Website:  http://www.arloor.com/                          #
# Author: ARLOOR <admin@arloor.com>                         #
# Github: https://github.com/arloor/iptablesUtils           #
#############################################################

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

评论

此博客中的热门博文

免费GPT4

【免费域名】注册!无需实名验证,不需要信用卡 Free Domain Name Registration Tutorial! No need for real-name verification, no credit card required.