Looking for the misty rain and the world of mortals, and thinking about poetry and painting in the south of the Yangtze River

VPS usage of NAT shared IP

Wandering the Jianghu 2017-12-27 Browse (14475) Comments (7)

Today, I saw that HostHK's family produced a cheap Hong Kong NAT chicken with an annual payment of 50 yuan, and I couldn't resist cutting hands.


After buying, only the intranet IP can be seen. The VPS information sent by email is also the intranet IP. Although there is ipv6, our school does not have an ipv6 network. Alas, garbage schools should be honest about using ipv4.


Send a TK to ask the customer service, get the public IP, and then attach the port number indicated in the VPS information after the public IP, and successfully connect to the chicken. (NAT chicken generally allocates 20 ports)


Then try to install a pagoda panel. According to the pagoda installation command, the 8888 panel port will still be displayed after the installation is completed. It must not be connected,


After installation, enter the command to modify the pagoda panel port.

Pagoda modify the panel port, if you want to change it to 2018 (centos 6)

  1. echo '2018' > /www/server/panel/data/port.pl && service bt restart 

  2. iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 2018 -j ACCEPT

  3. service iptables save

  4. service iptables restart


Pagoda modify the panel port, if you want to change it to 2018 (centos 7)

  1. echo '2018' > /www/server/panel/data/port.pl && service bt restart 

  2. firewall-cmd --permanent --zone=public --add-port=2018/tcp

  3. firewall-cmd --reload


After the port is replaced, you can access the pagoda panel with the public IP address and the new port.

If ipv6 is upgraded in the future, I'm afraid there will be no NAT chicken. It's just a small idea to allocate 20 ipv6 for each chicken. What shared IP ports should be allocated.


You can also set up a website with Tencent Cloud CDN , Yundun Cloud Acceleration and others that support custom ports can avoid the embarrassment of ports.

Title: VPS usage of NAT shared IP
Author authorization: Unless otherwise specified, this document is written by Intoxicated with Chinese style Original compilation and authorization Intoxicated with Chinese style blog Publication.
Copyright notice: This article uses the "Signature Sharing 4.0 International in the Same Way" Creative Sharing Agreement. Please follow the signature agreement when reprinting or using.
Comment List (7) Comments
 Netizen nickname: visitor
visitor tourist 2019-05-03 reply
How to implement customization to map a local port to a port
 Netizen nickname: bright moon and clear wind
at leisure tourist 2018-01-14 reply
Please cancel your site's friend chain in time
 Netizen nickname: Jiang Chen
Jiang Chen tourist 2017-12-31 reply
Er, I suddenly want to ask if I can be an accelerator?
 Netizen nickname: Intoxicated with Chinese style
Intoxicated with Chinese style administrators 2017-12-31 reply
@Intoxicated with Chinese style The delay is very low. It must be OK to make the S-S-R. The key is, it should not be sold
 Netizen nickname: littleplus
littleplus tourist 2017-12-31 reply
Hey, is that right I don't listen I don't listen
 Netizen nickname: littleplus
littleplus tourist 2017-12-29 reply
Stupid! There is no public IP address in the email, but there is a domain name pointing to the public IP address
 Netizen nickname: Intoxicated with Chinese style
Intoxicated with Chinese style administrators 2017-12-29 reply
@Intoxicated with Chinese style My subsequent orders were all for domain names. My orders were only for intranet IP, and then I asked the customer service. The customer service first told me the IP, and then sent me the domain names starting with nat0. I bought them earlier than you

Comment