natcfg.sh, port forwarding based on iptables, features support for domain names, ddns, udp, IP, etc. It is simpler to set up an intranet IP in NAT VPS. The disadvantage is that port segments are not supported. 1. Prerequisite operations are not necessary 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 2. Forwarding using natcfg.sh Under SSH: wget --no-check-certificate -qO natcfg.sh https://zhujiwiki.com/wp-content/uploads/2020/11/natcfg/natcfg.sh && bash natcfg.sh To continue setting, execute bash natcfg.sh 3. Uninstall natcfg.sh wget --no-check-certificate -qO natcfg.sh https://zhujiwiki.com/wp-content/uploads/2020/11/natcfg/dnat-uninstall.sh && bash dnat-uninstall.sh 4. Configuration File /etc/dnat/conf The project has been open source: https://github.com/arloor/iptablesUtils |
<<: Kuai Che Dao: Double 11 discount, Taiwan HiNet fixed/floating IP all 58 off, plus 1C1G for free
Vpsfast.Us, a US hosting provider, provides up to...
ProlimeHost, an American hosting provider, was fo...
DediPath, an American hosting provider, has its o...
Webhostpython is a US hosting provider that provi...
Hostsolutions, a Romanian hosting provider, has b...
Servers Only, a US hosting provider, was establis...
PQ.hosting, a Russian merchant and a formal compa...
HostYun was formerly Hostshare, established in 20...
MineServer, a Chinese merchant, mainly provides H...
RAKsmart, a Chinese hosting provider, focuses on ...
A400 Interconnect is a business founded in 2020. ...
HostDoc, a foreign hosting company, has been esta...
Orange Data, a Chinese merchant, provides VPS, in...
Clouvider is a British hosting company that opera...
Zare, a British hosting provider, was established...