Article background:
Wrote an article on how to build a personal website on your personal computer.
Create a Web site that is entirely up to you (i)
But a personal website is built on the PC, and the external computer is not directly accessible to our website. Need to deal with a problem called NAT traversal.
This paper mainly describes how to deal with the problem of Nat crossing with peanut shell.
First, the conceptual question
(1) What is NAT
In short, Nat is the use of internal addresses in the LAN internal network, and when the internal node to communicate with the external network, the gateway (can be understood as an exit, like a yard door) place, the internal address is replaced by the public address, so that the external public network (the Internet) normal use, NAT allows multiple computers to share an Internet connection, a feature that solves the problem of a shortage of public IP addresses. This way, you can only request a legitimate IP address, the entire local area network computer access to the Internet. At this point, Nat masks the internal network, and all intranet computers are invisible to the public network, and intranet computer users are not usually aware of the existence of Nat.
The above explanation is a bit of a mouthful, the specific explanation please search by yourself.
Introducing NAT The main thing that brings us a problem is that our computer or router does not have an independent public IP address, and the external cannot find our computer and cannot access our website.
(2) One way to resolve NAT: host mapping
host mapping, the host stream out of data through the forwarding server, forwarding to the external network access, is a data forwarding application, speed by the forwarding server bandwidth allocation or decision.
(3) Two ways to resolve NAT: Full port mapping
Full-port mapping, generally refers to point-to-points communication, through peer-to penetration data interaction, penetrating data directly, not forwarding, speed by two point network decision (usually thunder download is used this way).
(in fact, in some environments, in order to enhance the penetration effect, will be taken together with the forwarding server to use the effect more obvious. Virtual local Area network, that is, VPN, intranet a machine, and external network of a machine, are installed on the VPN application, realize interoperability, feel is the same LAN. )
(4) The difference between the two:
host mapping, that is, the Peanut shell server to help us forward, the effect is good. the only thing to be aware of is that because it is free, so people have to control the flow (remember the words as if the monthly 1G of traffic, but should be enough).
The following tutorial uses port mappings.
Second, the peanut shell installation and use
(1) Download (if the URL is invalid, please search the Peanut Shell website)
Here is the version of Peanut Shell 2.2: Please click "Download link"
because the official website said, The host mapping feature is not supported in version 2.3.
(2) Installation and registration
After installation is not ready to use, you need to register an account on the peanut shell.
1. Login to the Management center after registration.
2. Then click on your account name
3. Then enter the domain name list
4. Then register the shell domain name
5. Enter a name you want to register and see if it is registered
6. If you are not registered, you can register the domain name. Click "Register Now"
7. Because I already have the free domain name, therefore can not register again. (If the new registered Peanut Shell users can register)
8. To this, the registration is completed.
(2) Binding of domain name and website host
What we have now is: Build the website and install the peanut shell of the PC , a peanut shell application of the free domain name .
Now it's time to tie up these two things. After the binding, other people can use the domain name to access our computer Internet station on the outside.
1. First, log on to the peanut shell on the computer.
2. After entering the interface, see the domain name we have.
3. Right click on our domain name and pop up a menu. Select "New Peanut Shell Management".
4. Then, add the mappings
6. Fill in the IP and port of the host.
Host IP self-check, do not understand do not ask me.
Port, Internet sites typically use 80 ports (HTTP default ports), which can also be used on other ports.
I have two websites on my computer, so one of them uses 80 ports and the other one uses 8081 ports.
It is important to note that this port must be the same as the port configured on your Web server. If the configuration port of the Web server on your computer is not the same as the peanut shell, it is inaccessible.
(Below is the port configuration of my IIS server, port 80 for WordPress website access, 8081 for another site)
5. If the configuration is successful, save it.
Enter your domain name in the browser and you will be able to access the website on your computer.
The above process, because everyone's computer environment and operating details are different, there will certainly be a lot of problems. If it doesn't work, please leave a comment in the comments.
It practitioners need to pay attention to technology dynamics, but the content of the Internet is too discrete, good things are often hidden deep. It's now available in the public number . Search for
"small fish It Technology sharing", subscribe to my daily summary of IT technology information. Welcome everyone to pay attention to!
If you are interested, please click on the "public number related to it technology"
Finally say a nonsense, do not know whether you will meet. My site is currently inaccessible, supposedly, level two domain name is not to go to the record.
It practitioners need to pay attention to technology dynamics, but the content of the Internet is too discrete, good things are often hidden deep. It's now available in the public number .Search Attention
"Small fish's It technology sharing", subscribe to the IT technology information I gather for you every day. Welcome everyone to pay attention to!
If you are interested, please click on the "public number related to it technology"
Peanut Shell 2.0 Tutorial (troubleshooting NAT translation issues)