Coder Social home page Coder Social logo

iptables-man's Introduction

iptables-man

A script for forwarding by iptables[DDNS support] 基于iptables的端口转发脚本

管理脚本version1.0.9

后台脚本version1.0.3

支持Centos7+/Debian/Ubuntu

支持DDNS转发和静态IP转发,且重启后不会丢失规则

目前不支持端口段转发

目前尚在测试中,有BUG欢迎发issue

如果规则乱了,可以使用8看看是否能恢复。

使用方式:

wget -N --no-check-certificate https://raw.githubusercontent.com/MstKenway/iptables-man/master/iptables-man.sh && chmod +x iptables-man.sh&&./iptables-man.sh 

或者

curl -O https://raw.githubusercontent.com/MstKenway/iptables-man/master/iptables-man.sh && chmod +x iptables-man.sh&&./iptables-man.sh 

配置文件路径:/etc/iptables-man/iptables.conf 配置文件格式:

localIP:本机IP
SIP:本地端口:远端IP:远端端口
DDNS:本地端口:DDNS:原解析IP:远端端口

更新日志:

2020/09/27:1.0.9&1.0.3:重要更新。修复当规则数大于10的时候,一段时间后存在规则没删的问题(或者乱删)的问题。此次iptables-man和iptables-ddns都需要更新。

2020/08/28:更新iptables-ddns v1.0.2,修复对多个同一ddns的更新问题,更新iptables-ddns.sh的方法见下文。

1.0.8:修复部分手机客户端退出脚本后退格键问题

1.0.7:修复输入退格键问题;修改定时任务写入形式,不再覆盖原文件,而是修改crontab文件(避免如ddns等定时任务被删除)


iptables-ddns.sh更新方法:

  1. 删除iptables-ddns.sh
rm /etc/iptables-man/iptables-ddns.sh -f

2.重新安装脚本 即运行脚本后选1安装一遍就好~这样可以保留住配置文件。 否则手动备份配置文件,然后选择卸载脚本再安装也行。


1.0.5自启方式改变,建议1.0.4以前的卸载后重新安装(记得备份配置文件)

对于1.0.4以前的版本请使用以下代码卸载,或重装系统

sed -i "/iptables-ddns/d"  /etc/rc.local

提醒:不要在生产环境使用脚本!!!

感谢iptablesUtils&iptables-pf,参考借鉴不少

iptables-man's People

Contributors

mstkenway avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.