1. First, you must have an account with full access to the router;
2. Enter the address of the router, which is usually the default address.
192. 168. 1. 1。 Log in to the router management interface;
3. When you enter, you usually click the virtual host configuration option in "Application"-"Advanced NAT Configuration".
4. As can be seen from the figure, the port I mapped now is 4600, and the mapped host is this machine:192.5438+068.1.46, which will take effect after confirmation.
Port mapping is a kind of NAT, and its function is to convert addresses in public networks into private addresses.
The ADSL broadband router in routing mode has a dynamic or fixed public network IP, ADSL is directly connected to the hub or switch, and all computers can access the Internet.
Port mapping is divided into dynamic and static. Details are as follows:
Dynamic port mapping: suppose a computer in the intranet wants to access Sina, and it will send a packet to the NAT gateway. The packet header includes the other party's IP(Sina), port and local IP and port. The NAT gateway will replace the local IP and port with its own public IP and an unused port, and will record this mapping relationship so as to forward packets in the future. Then send the data to Sina.com, Sina.com will respond after receiving the data, and send the data to the unused port of NAT gateway, and then NAT gateway will forward the data to the computer in the intranet to realize the communication between the intranet and the public network. When the connection is closed, the NAT gateway will release the port assigned to this connection so that future connections can continue to be used. Dynamic port mapping is actually the working mode of NAT gateway.
Static port mapping: open a fixed port on the NAT gateway, and then set the IP and port where the data received by this port will be forwarded to the intranet. This mapping relationship will always exist whether it is connected or not. You can let the public network take the initiative to access the computers in the intranet.
reference data
The house of scripts. Script House [reference time 2018-1-19]