Article title: SolarisNAT server application instance. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The previous article introduced the NAT principle and implementation of NAT in the Solaris application environment.
1. NAT usage under Solaris
1. connect to the Internet, but there is not enough public Internet address allocated to the internal host. A small and medium-sized enterprise has a small number of internal machines and can access the INTERNET through NAT. in this case, only a valid IP address is required.
2. an ISP needs to be reassigned. Enterprises merge. two enterprises that use the same IP address segment can use NAT instead of re-planning the IP address, retaining the previous investment. But it is inevitable that the adoption of NAT may cause a loss of IP packet forwarding efficiency on the NAT router.
3. supports multiple servers and server load balancer. By giving a server cluster a logical IP address (10.10.10.100), you can configure NAT on the vro to share the load. A common example is TCP load balancing, which locates the access sequence of the external network to 10.10.100 on different servers.
2. Solaris NAT server application example
1. publish Web services on the LAN, network topology 1.
(1) Internet customers access servers in the LAN through NAT routers
Assume that the IP address of the elx0 interface of the WWW server in the Lan is 192.168.10.1, the IP address of the LAN interface elxl of the NAT router is 192.168.10.2, and the IP address of the interface connected to the Internet is 219.243.69.10, the IP address of the client on the Internet is random.
(2) publish service configurations on the LAN
Assume that the IP address obtained through the ADSL connection is 219.243.69.10 first.
When an Internet user browses the webpage of the Web server (219.243.69.10), NAT automatically switches to computer A (192.168.10.3 ). The Web server uses port 80.
File/etc/ipf/ipnat. conf? Hot swap? /P>
Map ppp0 192.168.10.0/24-> 219.243.69.10/32 proxy port ftp/tcp
Map ppp0 192.168.10.0/24-> 219.243.69.10/32 portmap tcp/udp 40000: 60000
Map ppp0 192.168.10.0/24-> 219.243.69.10/32
Rdr elx0 0.0.0.0/0 port 80-> 192.168.0.3 port 80 |
The/etc/ipf. conf file is as follows:
Pass in on elx0 from 192.168.10.0/22 to any
Pass out on elx0 from any to192.168.10.0/22 |
If you? ISP? R, institute? Are the IP addresses? /Etc/ipf/ipnat. conf? What about hot failover? /P>
Map ppp0 192.168.10.0/24-> 0/32 proxy port ftp/tcp
Map ppp0 192.168.10.0/24-> 0/32 portmap tcp/udp 40000: 60000
Map ppp0 192.168.10.0/24-> 0/32 |
[1] [2] [3] [4] Next page