• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3117
  • Last Modified:

Juniper SSG5 with NAT and VPN

Hi, I would like some direction on the following config. I would like to do the following:

I have 2 servers:
Server 1: IIS, Primary DNS, SMTP
Server 2: Email, Secondary DNS

Each Server has an internal IP range on each network card:
Server 1:
Server 2:

The firewall will have the public IPs assigned to Interface 0/0
Server 1 is plugged into 0/1
Server 2 is plugged into 0/2

What type of config would I need to get the above setup and allow Remote Desktop to each server via VPN? So far I have VPN working. But nothing else. Thank you :)
  • 4
  • 2
2 Solutions
wn411Author Commented:
Initial config so far:

set clock timezone -5
set clock dst recurring start-weekday 2 0 3 02:00 end-weekday 1 0 11 02:00
set vrouter trust-vr sharable
set vrouter "untrust-vr"
set vrouter "trust-vr"
unset auto-route-export
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 "ADMINNAMEHERE"
set admin password "PASSWORDHERE"
set admin access attempts 5
set admin http redirect
set admin auth web timeout 30
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin privilege read-write
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
set zone "DMZ" tcp-rst
set zone "VLAN" block
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 "Trust"
set interface "bgroup0" 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 XXX.XXX.XX.194/24
set interface ethernet0/0 route
set interface bgroup0 ip
set interface bgroup0 nat
set interface ethernet0/0 gateway XXX.XXX.XX.193
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
set interface bgroup0 ip manageable
set interface ethernet0/0 manage ssl
set interface ethernet0/0 manage web
unset interface ethernet0/0 g-arp
unset interface ethernet0/1 manage ssh
unset interface ethernet0/1 manage telnet
unset interface ethernet0/1 manage snmp
unset interface ethernet0/1 manage ssl
unset interface ethernet0/1 manage web
set interface bgroup0 manage mtrace
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 tcp-syn-check
unset flow tcp-syn-bit-check
set flow reverse-route clear-text prefer
set flow reverse-route tunnel always
set hostname XXXX_ssg5_XXXX
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 XXX.XXX.XX.18
set dns host dns2 XXX.XXX.XX.11
set dns host dns3
set dns host schedule 06:28 interval 12
set address "Trust" "Internal Net"
set user "ABC1" uid 2
set user "ABC1" ike-id u-fqdn "ABC1@domain.com" share-limit 1
set user "ABC1" type ike
set user "ABC1" "enable"
set ike gateway "ABCGateway1" dialup "ABC1" Aggr outgoing-interface "ethernet0/0" preshare "KEY" sec-level standard
unset ike gateway "ABCGateway1" nat-traversal
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 "ABCVPN1" gateway "ABCGateway1" no-replay tunnel idletime 0 sec-level standard
set vrouter "untrust-vr"
set vrouter "trust-vr"
set url protocol websense
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit
set policy id 1
set policy id 2 from "Untrust" to "Trust"  "Dial-Up VPN" "Internal Net" "ANY" tunnel vpn "ABCVPN1" id 0x7
set policy id 2
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set config lock timeout 5
unset license-key auto-update
set ssl encrypt 3des sha-1
set snmp port listen 161
set snmp port trap 162
set vrouter "untrust-vr"
set vrouter "trust-vr"
unset add-default-route
set vrouter "untrust-vr"
set vrouter "trust-vr"
Start off with adding logging to both the policy rules you have already, just to see whats going on with the RDP.

To summarise though, you are looking to have the user ABC1 logging in via remote access VPN (ie NS Remote) and then connect to the 2 servers in question using RDP?

When connected via VPN, does any traffic get to the servers, ie can you ping them etc?

After enabling the logging, try again and look for any logs that may indicate the failure.

wn411Author Commented:
OK I will enable logging.
Yes, user ABC1 will have to VPN before using RDP.
I can only ping I am not able to ping any servers. Probably due to the Windows firewall on the servers.
I will try the above and report back.
Simple Misconfiguration =Network Vulnerability

In this technical webinar, AlgoSec will present several examples of common misconfigurations; including a basic device change, business application connectivity changes, and data center migrations. Learn best practices to protect your business from attack.

wn411Author Commented:
Here is the policy log when pinging and trying to remote desktop to after VPN connection
wn411Author Commented:
Problem was I had the external IP for the gateway IP on each server. I changed it to and everything is working fine.
Hehe, glad its working now bud, :D
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The Firewall Audit Checklist

Preparing for a firewall audit today is almost impossible.
AlgoSec, together with some of the largest global organizations and auditors, has created a checklist to follow when preparing for your firewall audit. Simplify risk mitigation while staying compliant all of the time!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now