Brook/iptables port forwarding one-click management script, support DDNS

Brook/iptables port forwarding one-click management script, support DDNS

1. Brook Script Version

A modified version of the original Brook port forwarding one-key management script, which adds support for dynamic domain names and automatically updates the domain name IP after enabling monitoring.

Based on iptables firewall, remember to install iptables.

Install Brook, then configure port forwarding, and finally start Brook.

 wget -N --no-check-certificate https://zhujiwiki.com/wp-content/uploads/2020/01//brook-pf-mod.sh && chmod +x brook-pf-mod.sh
./brook-pf-mod.sh

Reprinted from: https://github.com/yulewang/brook/

2. iptables script version

 wget -N --no-check-certificate https://zhujiwiki.com/wp-content/uploads/2020/01/iptables-pf.sh && chmod +x iptables-pf.sh
bash iptables-pf.sh

3. Related issues

1. Uninstall firewalld and ufw

 apt remove firewalld ufw

or

 yum remove firewalld ufw

Then reboot.

2. Install iptables

 yum install -y iptables
yum update iptables 
yum install iptables-services

iptables configuration file: /etc/sysconfig/iptables

3. Enable the forwarding function

 echo -e "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p

4. Set up the iptable automatic loading rules function at startup

CentOS systems:

 service iptables save
systemctl enable iptables.service

Debian/Ubuntu systems:

 iptables-save > /etc/iptables.up.rules
echo -e '#!/bin/bash\n/sbin/iptables-restore < /etc/iptables.up.rules' > /etc/network/if-pre-up.d/iptables
chmod +x /etc/network/if-pre-up.d/iptables

<<:  Collection of registrable 4-character .com domain names

>>:  HKServerSolution: 359 yuan/quarter/2G memory/15GB SSD space/1TB traffic/1Gbps port/KVM/San Jose CN2 GIA

Recommend

CentralHosts VPS latest 25% discount

I have previously introduced CentralHosts' vi...

free-www: $0.8/month/256MB RAM/5GB SSD space/unlimited traffic/KVM/Siberia

free-www, a Russian hosting provider, provides va...

CloudCone: $1.8/month/512MB memory/10GB SSD space/1TB traffic/KVM/Los Angeles

CloudCone is a relatively active hosting provider...

UltraVPS: €2/month/1 CPU/512MB/15GB SSD/500GB bandwidth/Xen

UltraVPS, a German hosting provider, provides Xen...

JixServer: $24/year/400GB hard drive/40TB traffic/US

JixServer, a new hosting provider, now offers spe...

SpeedyKVM: $4/month/2.6G memory/1TB space/10TB traffic/KVM/Dallas

SpeedyKVM is a direct sub-brand of Incero Compute...

.p domain name, annual payment of US$34.98

This is not a normal domain name, and it is not re...

BELIRA: $5.5/year/10GB storage/100GB traffic/unlimited domain names/New York

BELIRA, an American hosting provider, has been pr...