Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[ScreenOS] Configuring a virtual IP for port forwarding

0

0

Article ID: KB4740 KB Last Updated: 27 Jun 2020Version: 11.0
Summary:

This article provides information on how to configure a virtual IP for port forwarding.

The configuration of a virtual IP for port forwarding enables an external host to access network services, which are behind the firewall, by mapping the NAT address of the internal host or service to an external address, based on destination port number.

Solution:

To configure a Virtual IP, perform the following steps:

Note: To configure a Virtual IP (VIP), you will need to have the the related interfaces bound to security zones. For more information on how to bind an interface to a zone, go to Binding an Interface to a Zone.

For this example, we are configuring a VIP address for a web server, and we are using ethernet1 for the Trust zone and ethernet3 for the Untrust zone.

1. Open the WebUI. For more information on accessing the WebUI, go to Accessing Your NetScreen Device Using the WebUI.

2. From the ScreenOS options menu, click Network, and then click Interfaces.

3. From the ethernet3 interface, click Edit.

4. From the Edit screen, click to select VIP.

5. From Virtual IP Address, enter the IP address of the web server.

Note: For this example, we have entered 210.1.1.10.

6. Click Add.

7. Click New VIP Service.

8. From the Virtual IP drop-down menu, select the Virtual IP address. In the Virtual Port text box, enter a port number. From the Map to Service drop-down menu, select a service. In the Map to IP text box, enter the internal IP address of the web server.

Note: For this example, we used a Virtual IP of 210.1.1.10, a Virtual Port of 80, a Map to Service of HTTP (80), and a Map to IP of 192.168.1.10.

9. Click OK.

Note: The Virtual IP will listen to the Virtual Port. If you have a Virtual Port of 80, and a policy with the ANY service, all traffic going through port 80 will be passed.

10. From the ScreenOS options menu, click Policy > Policies

11. From the From drop-down menu, click to select Untrust. From the To drop-down menu, click to select Trust.

12. Click New.

13. Under Source Address, click to select Address Book. From the Address Book drop-down menu, click to select Any.

14. Under Destination Address, click to select Address Book. From the Address Book drop-down menu, click to select VIP (210.1.1.10).

15. From the Service drop-down menu, click to select HTTP. From the Action drop-down menu, click to select Permit.

16. Click OK.

Via the CLI:

You can configure the same via the CLI:

set interface ethernet0/1 vip 210.1.1.10 80 "HTTP" 192.168.1.10
set policy id 1 from "Untrust" to "Trust"  "Any" "VIP(210.1.1.10)" "HTTP" permit
Modification History:
2020-06-27: Updated WebUI snapshots.
2020-03-19: Article reviewed for accuracy. No changes made. Article is correct and complete.
2017-12-07: Minor non-technical edits.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search