[IP port mapping] using IP port mapping for extranet access to intranet database

Source: Internet
Author: User
Tags mssql mssql client mysql database oracle database
External Network access intranet database-p2p penetrationIntranet database after deployment, such as local (dynamic) public IP, you can use nat123 dynamic Domain name resolution, real-time domain name resolution to the local public network IP, fixed domain name, thus through the domain name access, connected to the corresponding database application.

such as the intranet without public IP, to achieve external network access to the intranet database, using the NAT123 scheme is: Change the port map of the access port, do not change the access port of the full-port mapping peer, unchanged access port of full-port mapping and forwarding peer. Take Oracle, MSSQL (SQL Server), MySQL three as an example, the specific implementation process is as follows.


One, change the nat123 port mapping of the access port, realize the extranet access to intranet database
1. Database for Oracle Reference
(1) Install and enable nat123 on the intranet, add mappings, and choose to use other app types. The intranet address port corresponds to the intranet Oracle connection address port, and the extranet address port is customized. The default allocation port of the extranet port is the available port, can also be customized, the network address can be directly used to prompt the default free domain name.

(2) After the mapping is successful, the external network Oracle Client connection is accessed by configuring the mapped extranet domain name port as the corresponding connection access address.
Reference Path: \oracle\product\10.1.0\db_1\network\admin\tnsnames.ora, configure an Oracle connection host = Mapped extranet domain name (ora.nat123.net), port = mapped external network port ( 47261), custom connection name (NAT123WW).

Enable the Oracle Connection tool Plsqldev to connect to the corresponding intranet Oracle database by configuring the connection (NAT123WW) via the mapped extranet address port.
2. Database is an example of MSSQL (SQL Server)
(1) Install and enable nat123 on the intranet, add mappings, and use other app types. Intranet address port is the LAN MSSQL address port, the network address port customization.

(2) After the mapping succeeds, the external network access connection MSSQL uses the mapped extranet address domain name port. Note The SQL Server Client connection address format is, "msql.nat123.net,43314", and the domain name is a comma with the English IME in the port.

3. Database MySQL Example
(1) Install and enable nat123 on the intranet, add mappings, and use other app types. The intranet address port corresponds to the intranet MySQL address port. Extranet address port customization.

(2) After the mapping succeeds, the external network connection accesses MySQL, using the mapped extranet domain name port.

Second, do not change the access port of the nat123 full-port mapping peer, to achieve external network connection intranet database
1. Database for Oracle Reference
(1) Install and enable nat123 on the intranet, add mappings, and choose to use full port mapping to peer. The intranet address corresponds to the intranet Oracle database host address, and the extranet address is a custom extranet domain name.

(2) After the mapping succeeds, when the external network Oracle Client connection is accessed, the mapped extranet domain name is configured as the corresponding connection access address. The reference path is: \oracle\product\10.1.0\db_1\network\admin\tnsnames.ora, configure an Oracle connection host = Mapped extranet domain name (sql.nat123.net), PORT = 1521, Custom connection Name (NAT123P2P).
Install and enable nat123p2p visitors at the same time, adding Oracle access to the extranet domain name sql.nat123.net and port 1521.
The corresponding intranet Oracle database can then be connected. Use the Oracle Connection tool to Plsqldev the connection.
2. Database is an example of MSSQL (SQL Server)
(1) Install and enable nat123 on the intranet, add mappings, and use full port mapping to peer. Intranet address is the network MSSQL host address, the external network address is a custom external domain name.
(2) After successful mapping, the external network MSSQL Client access side, install and enable nat123p2p visitors, add access to the domain name and port 1433.
Then use the mapped network address domain name can be connected to the corresponding intranet MSSQL.

3. Database MySQL Example
(1) Install and enable nat123 on the intranet, add mappings, and use full port mapping to peer. Intranet address port is the intranet MySQL corresponding address port, the external network address port is a custom extranet domain name port.

(2) Install and enable nat123p2p visitors on the access side to add the MySQL extranet access address port.

You can then access the corresponding MySQL database application via the mapped extranet address domain name.
Third, the nat123 full port mapping of the invariant access port forwards peer to network access to the intranet database
Similar to full-port mapping, it is only when you add a map that you choose to use full port mapping to forward peer.

On the access side, you also need to install and enable the nat123p2p visitor and add the open corresponding database access port.


Reprint URL (including screenshot): http://www.nat123.com/Pages_8_266.jsp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.