In this scenario, your company combines network address translation (NAT) and IP filtering together. Your company wants to hide its personal computers and Web server behind a single, public IP address and wants to allow other companies to access the Web server.
Your business has a moderately sized internal network that uses a System i™ model as its gateway. You want to transfer all Web traffic from the gateway system to a dedicated Web server behind the gateway. The Web server runs on port 5000. You want to hide all of your private personal computers and the Web server behind an address on the System i interface, AS02 in the following figure. You also want to allow other companies to access the Web server. What should you do?
You can use IP filtering and NAT together to configure your personal computers and Web server:
To configure the hide NAT packet rules described in this scenario, use the Address Translation wizard in iSeries™ Navigator. The wizard requires the following information:
To use the Address Translation wizard, follow these steps:
This packet rule hides your four personal computers behind a public address so that they can access the Internet. Your hide NAT packet rule looks like the following example.
To configure the port-mapped NAT, follow these steps:
Because you already created a defined address to represent the public address 192.27.1.1 when you configured the hide NAT packet rules, you can omit this step for this particular scenario and skip to Step 4. However, if you use these instructions to configure the port-mapped NAT for your own network and you did not configure the hide NAT packet rules, then continue with the instructions for this step:
This port-mapped NAT hides your Web server address and port number behind a public address and port number. Notice that both NAT rules are hidden behind one common IP address. This is acceptable as long as the addresses you are hiding do not overlap. This port-mapped NAT rule only allows externally initiated traffic on port 80 to access your system.
The port-mapped NAT rule looks like the following example:
ADDRESS Web250 IP = 10.1.1.250 ADDRESS BEHIND1 IP = 192.27.1.1 HIDE Web250:5000 BEHIND BEHIND1:80 TIMEOUT = 16 MAXCON = 64 JRN = OFF
To create the filter rules described in this scenario, follow these steps:
These filters, in conjunction with the HIDE statement, permit any inbound traffic destined for your private network through to NAT and any outbound traffic out to the Internet. However, NAT enables only externally initiated traffic on port 80 to enter the system. NAT does not translate externally initiated traffic that does not match the port-mapped NAT rule. The filter rules look like the following example:
FILTER SET external_files ACTION = PERMIT DIRECTION = INBOUND SRCADDR = * DSTADDR = 192.27.1.1 PROTOCOL = TCP DSTPORT = * SRCPORT = * JRN = OFF
FILTER SET external_files ACTION = PERMIT DIRECTION = OUTBOUND SRCADDR = 192.27.1.1 DSTADDR = * PROTOCOL = TCP DSTPORT = * SRCPORT = * JRN = OFF
This statement binds (associates) the 'external_rules' filter set with the correct physical interface.
FILTER_INTERFACE LINE = TRNLINE SET = external_files
After you finish creating these filter rules, you should verify them to ensure they will be activated without errors. After that, you can activate them.