Link to home
Start Free TrialLog in
Avatar of jenit
jenit

asked on

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

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.
Avatar of Qlemo
Qlemo
Flag of Germany image

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.
Avatar of jenit
jenit

ASKER

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
Avatar of jenit

ASKER

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
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).
Avatar of jenit

ASKER

I added the same peer id (assuming these are the same) on the gateway config of both sides...still nothing.  
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.
Avatar of jenit

ASKER

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     /    
   
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jenit

ASKER

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.  
Avatar of jenit

ASKER

AWESOME!!! THANKS!  You deserve your rank as Genius.  I really appreaciate your help.