HP 2064-F ClusterPack V2.4 Tutorial - Page 44
Setup the NAT rules
View all HP 2064-F manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 44 highlights
% man 8 ipf z List the input output filter rules % ipfstat -hio Setup the NAT rules In this section, we will walk through the steps of setting up HP-UX IPFilter that translate the source IP addresses of all packets from the compute private subnet to the IP address of the gateway node. For addin more sophisticated NAT rules, please refer to the IPFilter documentation. 1. Create a file with NAT rules. Example 1: Map packets from all Compute Nodes in the 192.168.0.x subnet to a single IP address 15.99.84.23 % cat /tmp/nat.rules # lan0 -- interface to the external network # NAT IP interface: 15.99.84.23 map lan0 192.168.0.0/24 -> 15.99.84.23/32 portmap tcp/udp 40000:60000 map lan0 192.168.0.0/24 -> 15.99.84.23/32 EOF % cat /tmp/nat.rules # lan0 -- interface to the external network # NAT IP interface: 15.99.84.23 map lan0 192.168.0.0/24 -> 15.99.84.23/32 portmap tcp/udp 40000:60000 map lan0 192.168.0.0/24 -> 15.99.84.23/32 Example 2: Map packets from specific Compute Nodes (192.168.0.3 and 192.168.0.4) to a single IP address 15.99.84.23 % cat /tmp/nat.rules # lan0 -- interface to the external network # NAT IP interface: 15.99.84.23 map lan0 192.168.0.3/32 -> 15.99.84.23/32 portmap tcp/udp 40000:60000 map lan0 192.168.0.3/32 -> 15.99.84.23/32 map lan0 192.168.0.4/32 -> 15.99.84.23/32 portmap tcp/udp 40000:60000 map lan0 192.168.0.4/32 -> 15.99.84.23/32 EOF % cat /tmp/nat.rules # lan0 -- interface to the external network # NAT IP interface: 15.99.84.23 map lan0 192.168.0.3/32 -> 15.99.84.23/32 portmap tcp/udp 40000:60000 map lan0 192.168.0.3/32 -> 15.99.84.23/32