How do I create a LAN to LAN VPN using preshared secrets to a site with a Dynamically assigned IP address?
| Knowledge Base ID: | KB6332 |
| Version: | 5.0 |
| Published: | 07 Oct 2008 |
| Updated: | 07 Oct 2008 |
| Categories: |
Firewall/IPSec_VPN IPSec ScreenOS |
Policy-based VPN - One Side has a Dynamic IP using Pre-shared Keys
Problem:
Environment:
Solution:- Preshared secrets
- Policy Based VPN
- Static IP Addresses on' one one gateway
- Dynamically assigned IP address on one gateway
This example assumes static IP address is assigned to site A, and site B gets its IP address dynamically via DHCP. Assume the preshared secret used is netscreen. The matrix below will show the proposals we will use for this example:
| Site | A | B |
| Untrust IP of Firewall | 1.1.1.1 | DHCP (local id siteb.netscreen.com) |
| Trust Network | 10.1.1.0/24 | 172.16.10.0/24 |
| Phase 1 Proposal | pre-g2-3des-sha | pre-g2-3des-sha |
| Phase 2 Proposal | g2-esp-3des-sha | g2-esp-3des-sha |
Site A:
- Click VPNs > AutoKey Advanced > Gateway
- Click New
- Gateway Name: Site B GW
- Security Level: Custom
- Remote Gateway: Click Dynamic IP Address, and enter peer id siteb.netscreen.com
- Preshared Key: netscreen
- Outgoing Interface: untrust (or whichever interface goes out to the Internet)
- Click Advanced
- Phase 1 Proposal: pre-g2-3des-sha
- Mode (Initiator): Aggressive
- Click Return
- Click OK
- Click Autokey IKE
- Click New
- VPN Name: Site B VPN
- Security Level: Custom
- Remote Gateway: Click Predefined, and select Site B GW from the pulldown menu
- Click Advanced
- Phase 2 Proposal: g2-esp-3des-sha
- Click Return
- Click OK
- Click Policy
- Select From Trust to Untrust Zone, and click New
- Source Address: Click New Address, and enter 10.1.1.0/24
- Destination Address: Click New Address, and enter 172.16.10.0/24
- Service: Any
- Action: Tunnel
- Tunnel: Site B VPN
- Modify matching bidirectional VPN policy: Enabled
- Click Ok
- Position at Top: Enabled
Site B:
- Click VPNs > AutoKey Advanced > Gateway
- Click New
- Gateway Name: Site A GW
- Security Level: Custom
- Remote Gateway: Click Static, and enter IP address 1.1.1.1
- Preshared Key: netscreen
- Local ID: siteb.netscreen.com
- Outgoing Interface: untrust (or whichever interface goes out to the Internet)
- Click Advanced
- Phase 1 Proposal: pre-g2-3des-sha
- Mode (Initiator): Aggressive
- Click Return
- Click OK
- Click Autokey IKE
- Click New
- VPN Name: Site A VPN
- Security Level: Custom
- Remote Gateway: Click Predefined, and select Site A GW from the pulldown menu
- Click Advanced
- Phase 2 Proposal: g2-esp-3des-sha
- Click Return
- Click OK
- Click Policy
- Select From Trust to Untrust Zone, and click New
- Source Address: Click New Address, and enter 172.16.10.0/24
- Destination Address: Click New Address, and enter 10.1.1.0/24
- Service: Any
- Action: Tunnel
- Tunnel: Site A VPN
- Modify matching bidirectional VPN policy: Enabled
- Click Ok
- Position at Top: Enabled
NOTE:
The VPN tunnel must be initiated from a host behind the gateway with the dynamically assigned IP address. This requires sending any traffic from a host behind the Juniper firewall that has its IP address assigned dynamically. Otherwise, the VPN tunnel will not be built.
Configuration