Solved

How to create VPN tunnel from Juniper SSg5 dynamic cable to juniper SSg20 static ip

Posted on 2010-09-14
10
3,512 Views
Last Modified: 2013-12-14
I am a dabbler in routing to the point of I can copy a current config and make minor modifications to static IP's to make it work.  That being said, in laymans terms I need help.  I currently have working static tunnels set up between remotes with Juniper SSG 5's to a Juniper SSG 20 at home office. I am using these tunnels for both data and IP phones.  I need to now configure this for a home environment that has dynamic IP timewarner cable (but could be dsl or anything else in the future).  I'm thinking the tweak to make the switch to dynamic should be easy - but cannot get it working.  I'm hoping I simply have to plug the 0/0 of the juniper into my cable router, make changes in both junipers(what these are I hope to learn from you) and go on...or is there more to it and I have to do something with the cable router as well?  The cable is currently configured as left by vendor.  It does hand off a DHCP address to all connected computers.  It is handing off a 172.16.0.x address and the box itself is 172.16.0.1 at this time.  I would like be able to specify the IP range of the connected equipment.  192.168.85.x to keep with a subnet w/in network convention.
0
Comment
Question by:jenit
  • 6
  • 4
10 Comments
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
You need to set up DynDNS or something similar to connect your dynamic IP with a DNS name.
Then configure both devices as you would normally, but the responder (static end) has that DNS name configured as gateway, and Aggressive Mode instead of Main Mode. Both is defined in your Phase 1 settings (AutoIKE Advanced > Gateway).

Aggressive Mode should have a Phase 1 ID filled out to identify more exactly who wants to connect. Usually you do that anyways, no matter if Main or Aggressive mode.
0
 

Author Comment

by:jenit
Comment Utility
I set up the dyndns account.  Is this what you were talking about for using it?  Tunnel 7 is the one in question.  Here are exerpts from the home office SSG20.  I'll attach the one from the Dynamic SSG5 in a seperate email

set ike gateway "GW - Jenny" address newc.dyndns-home.com Aggr local-id "newc-home" outgoing-
interface "ethernet0/0" preshare "D3JehQSrNZrb+3srrlCI5RSj0pn4fz267A==" proposal "pre-g2-3des-sha" "pre-g2-aes128-sha"
set ike gateway  "GW - Jenny" nat-traversal
set ike gateway "GW - Jenny" nat-traversal udp-checksum
set ike gateway "GW - Jenny" nat-traversal keepalive-frequency 5

set vpn "Jenny - Tunnel" gateway "GW - Jenny" replay tunnel idletime 0 proposal "g2-esp-3des-sha"
set vpn "Jenny - Tunnel" monitor optimized rekey
set vpn "Jenny - Tunnel" id 11 bind interface tunnel.7
set interface tunnel.7 nhtb 192.168.90.1 vpn "Jenny - Tunnel"

set route 192.168.90.0/24 interface tunnel.7 preference 20
0
 

Author Comment

by:jenit
Comment Utility
Here is the full config from the dynamic SSG5...strange thing...it is pulling down a different public ip than what I got when I was connected via wireless to set up the dyndns account?   The wireless router is not in the mix at this time.  I am connect from cable router to 0/0 of juniper then to 0/2 with computer.  

unset key protection enable
set clock timezone 0
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set alg appleichat enable
unset alg appleichat re-assembly enable
set alg sctp enable
set auth-server "Local" id 0
set auth-server "Local" server-name "Local"
set auth default auth server "Local"
set auth radius accounting port 1646
set admin name "netscreen"
set admin password "nCY0J3rrENRGctiDisxIaHItJRI1Bn"
set admin user "IT" password "nEWQMqreF6VJcTZIssYL2rKtfbMYrn" privilege "all"
set admin auth web timeout 10
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin format dos
set zone "Trust" vrouter "trust-vr"
set zone "Untrust" vrouter "trust-vr"
set zone "DMZ" vrouter "trust-vr"
set zone "VLAN" vrouter "trust-vr"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst
set zone "Untrust" block
unset zone "Untrust" tcp-rst
set zone "MGT" block
unset zone "V1-Trust" tcp-rst
unset zone "V1-Untrust" tcp-rst
set zone "DMZ" tcp-rst
unset zone "V1-DMZ" tcp-rst
unset zone "VLAN" tcp-rst
set zone "Untrust" screen tear-drop
set zone "Untrust" screen syn-flood
set zone "Untrust" screen ping-death
set zone "Untrust" screen ip-filter-src
set zone "Untrust" screen land
set zone "V1-Untrust" screen tear-drop
set zone "V1-Untrust" screen syn-flood
set zone "V1-Untrust" screen ping-death
set zone "V1-Untrust" screen ip-filter-src
set zone "V1-Untrust" screen land
set interface "ethernet0/0" zone "Untrust"
set interface "ethernet0/1" zone "DMZ"
set interface "bgroup0" zone "Trust"
set interface "tunnel.7" zone "Trust"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
set interface bgroup0 port ethernet0/5
set interface bgroup0 port ethernet0/6
unset interface vlan1 ip
set interface ethernet0/0 ip 70.94.97.143/20
set interface ethernet0/0 route
set interface bgroup0 ip 192.168.90.1/24
set interface bgroup0 nat
set interface tunnel.7 ip unnumbered interface bgroup0
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
unset interface ethernet0/0 ip manageable
set interface bgroup0 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/0 manage ssl
set interface ethernet0/0 manage web
set interface bgroup0 manage mtrace
set interface bgroup0 monitor track-ip ip
set interface bgroup0 monitor track-ip threshold 150
set interface bgroup0 monitor track-ip weight 1
unset interface bgroup0 monitor track-ip dynamic
set interface ethernet0/0 dhcp client enable
unset interface ethernet0/0 dhcp client settings update-dhcpserver
set interface bgroup0 dhcp server service
set interface bgroup0 dhcp server auto
set interface bgroup0 dhcp server option netmask 255.255.255.0
set interface bgroup0 dhcp server option domainname kc.rr.com
set interface bgroup0 dhcp server option dns1 76.85.229.110
set interface bgroup0 dhcp server option dns2 76.85.229.111
set interface bgroup0 dhcp server ip 192.168.90.125 to 192.168.90.145
unset interface bgroup0 dhcp server config next-server-ip
set interface "serial0/0" modem settings "USR" init "AT&F"
set interface "serial0/0" modem settings "USR" active
set interface "serial0/0" modem speed 115200
set interface "serial0/0" modem retry 3
set interface "serial0/0" modem interval 10
set interface "serial0/0" modem idle-time 10
set flow tcp-mss
unset flow no-tcp-seq-check
unset flow tcp-syn-check
unset flow tcp-syn-bit-check
set flow reverse-route clear-text prefer
set flow reverse-route tunnel always
set console timeout 0
set domain kc.rr.com
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 68.94.156.1
set dns host dns2 0.0.0.0
set dns host dns3 0.0.0.0
set crypto-policy
exit
set ike gateway "GW-Lenexa" address 68.143.x.x Aggr local-id "newc-home" outgoing-interface "ethernet0/0" preshare "MHZLz5DNNDOmIhsHP3CMxkXDASngDtPgug==" proposal "pre-g2-3des-sha"
set ike gateway "GW-Lenexa" nat-traversal
set ike gateway "GW-Lenexa" nat-traversal udp-checksum
set ike gateway "GW-Lenexa" nat-traversal keepalive-frequency 5
set ike respond-bad-spi 1
set ike ikev2 ike-sa-soft-lifetime 60
unset ike ikeid-enumeration
unset ike dos-protection
unset ipsec access-session enable
set ipsec access-session maximum 5000
set ipsec access-session upper-threshold 0
set ipsec access-session lower-threshold 0
set ipsec access-session dead-p2-sa-timeout 0
unset ipsec access-session log-error
unset ipsec access-session info-exch-connected
unset ipsec access-session use-error-log
set vpn "Tunnel-Lenexa" gateway "GW-Lenexa" replay tunnel idletime 0 proposal "g2-esp-3des-sha"
set vpn "Tunnel-Lenexa" monitor optimized rekey
set vpn "Tunnel-Lenexa" id 0x1 bind interface tunnel.7
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
set url protocol websense
exit
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit
set policy id 1
exit
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set config lock timeout 5
unset license-key auto-update
set telnet client enable
set snmp port listen 161
set snmp port trap 162
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
set route 192.168.10.0/24 interface tunnel.7 preference 20
set route 192.168.0.0/16 interface tunnel.7 preference 20
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
You are not defining a proxy ID. I can't remember exactly which proxy ID is sent then when using route based VPN, but since you have two routes defined for tunnel.7 on SSG5 there might be a mismatch. Better to hardcode the proxy ID (Phase 2 config), so it is the same on both sides. It should work without, but might create two Phase 2 SAs (one for each route defined).
0
 

Author Comment

by:jenit
Comment Utility
I added the same peer id (assuming these are the same) on the gateway config of both sides...still nothing.  
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
No, I did not mean Peer ID - that was already the same. In Phase 2 (AutoKey Advanced), Advanced, you can set a explicit Proxy ID. That is the network both parties will use.
0
 

Author Comment

by:jenit
Comment Utility
Sorry to be so slow on this but I am confused..I only see phase 2 in VPN/AutoKey IKE - my tunnel name  Then on the advanced tab.    There is the check box for proxy-id.  But it will only accept IP addresses?  Am I missing something???  

Security Level
  Predefined  Standard   Compatible   Basic  
  User Defined  Custom  
     Phase 2 Proposal   correct phase 2 is chosen
Bound to tunnel.7
     Proxy-ID   THERE is a check box here...but only allows me to put IP.
   Local IP / Netmask     /    
   Remote IP / Netmask     /    
   
0
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
Yes, that is correct. You should put the respective network addresses in each. But wait, I just saw that you use a particular IP address on SSG20 tunnel.7, which is (even worse) the same as the SSG5 bgroup0 IP. You should use unnumbered on both sides, as long as you can do full routing.

With tunnel.7 set to unnumbered, it could even be that you do not need to set up an explicit proxy ID. But if, than set something like
on SSG20:
   192.168.0.0/16
   192.168.90.0/24
on SSG5
   192.168.90.0/24
   192.168.0.0/16

BTW, the route
   set route 192.168.10.0/24 interface tunnel.7 preference 20
is superfluous, it is superceeded by
   set route 192.168.0.0/16 interface tunnel.7 preference 20
0
 

Author Comment

by:jenit
Comment Utility
Thank you for the new information.  It will be a bit before I can test this as I have to be at home with the connection...I'll let you know my findings later today.  
0
 

Author Closing Comment

by:jenit
Comment Utility
AWESOME!!! THANKS!  You deserve your rank as Genius.  I really appreaciate your help.  
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now