[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 865
  • Last Modified:

Juniper Port Forwarding Issue

unset key protection enable
set clock ntp
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"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set service "RDP" protocol tcp src-port 3389-3389 dst-port 3389-3389
set service "RDP" + udp src-port 3389-3389 dst-port 3389-3389
set service "VPN" protocol tcp src-port 1723-1723 dst-port 1723-1723
set service "VPN" + udp src-port 1723-1723 dst-port 1723-1723
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 "nKVUM2rwMUzPcrkG5sWIHdCtqkAibn"
set admin auth web timeout 10
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin format dos
set vip multi-port
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 id 100 "XO T-1"
set zone "XO T-1" vrouter "untrust-vr"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst
unset 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
unset zone "XO T-1" 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 "Untrust"
set interface "bgroup0" zone "Trust"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
unset interface vlan1 ip
set interface ethernet0/0 ip 33.33.33.33/29
set interface ethernet0/0 nat
set interface ethernet0/1 ip 66.66.66.66/27
set interface ethernet0/1 nat
set interface bgroup0 ip 10.1.25.1/24
set interface bgroup0 nat
set interface ethernet0/0 gateway 33.33.33.38
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
unset interface ethernet0/1 ip manageable
set interface bgroup0 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/1 manage ping
set interface ethernet0/1 manage telnet
set interface bgroup0 manage mtrace
set interface ethernet0/0 monitor track-ip ip
set interface ethernet0/0 monitor track-ip ip 4.2.2.2 interval 5
set interface ethernet0/0 monitor track-ip ip 4.2.2.2 threshold 2
unset interface ethernet0/0 monitor track-ip dynamic
set interface ethernet0/1 monitor track-ip ip
unset interface ethernet0/1 monitor track-ip dynamic
set interface ethernet0/0 vip 44.44.44.44 3389 "RDP" 10.1.25.3
set interface ethernet0/0 vip 44.44.44.45 3389 "RDP" 10.1.25.2
set interface ethernet0/0 backup interface ethernet0/1 type track-ip
set interface "ethernet0/0" mip 33.33.33.33 host 10.1.25.2 netmask 255.255.255.255 vr "trust-vr"
set interface "ethernet0/1" mip 66.66.66.66 host 10.1.25.2 netmask 255.255.255.255 vr "trust-vr"
set interface "ethernet0/1" mip 66.66.66.66 host 10.1.25.3 netmask 255.255.255.255 vr "trust-vr"
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 pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 75.75.75.75
set dns host dns2 0.0.0.0
set dns host dns3 0.0.0.0
set address "Trust" "ATL-DC-01" 10.1.25.2 255.255.255.255
set address "Trust" "ATL-NAS-01" 10.1.25.3 255.255.255.255
set address "Trust" "Video Conference" 10.1.25.21 255.255.255.0
set crypto-policy
exit
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 url protocol websense
exit
set policy id 3 from "Untrust" to "Trust"  "Any" "VIP(50.73.85.35)" "RDP" permit log
set policy id 3
exit
set policy id 2 from "Untrust" to "Trust"  "Any" "VIP(44.44.44.44)" "RDP" permit log
set policy id 2
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 snmpv3 local-engine id "0164062011000659"
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
set route 0.0.0.0/0 interface ethernet0/1 gateway 66.104.135.65 preference 20 metric 30
set route 10.5.25.0/24 gateway 10.1.25.254
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
0
Mzucchi
Asked:
Mzucchi
  • 5
  • 3
1 Solution
 
Sanga CollinsSystems AdminCommented:
Could you provide some info on what your are trying to accomplish?
0
 
MzucchiAuthor Commented:
Opps, it cut off the first part of the question.

I'm trying to connect to a private host on the LAN side of the firewall using RDP or any other service/port from the public WAN side of either the primary WAN int or the Secondary WAN int. I thought I had the correct VIP and Policy in place, but cannot seem to connect an RDP Session.

Thanks
0
 
Sanga CollinsSystems AdminCommented:
set interface ethernet0/0 vip 44.44.44.44 3389 "RDP" 10.1.25.3
set interface ethernet0/0 vip 44.44.44.45 3389 "RDP" 10.1.25.2
set interface ethernet0/0 backup interface ethernet0/1 type track-ip
set interface "ethernet0/0" mip 33.33.33.33 host 10.1.25.2 netmask 255.255.255.255 vr "trust-vr"
set interface "ethernet0/1" mip 66.66.66.66 host 10.1.25.2 netmask 255.255.255.255 vr "trust-vr"
set interface "ethernet0/1" mip 66.66.66.66 host 10.1.25.3 netmask 255.255.255.255 vr "trust-vr"

do any of these maps work? if so which ones?

Id have to check on a device to confirm, but i believe you can not use a VIP on an interface confgured with a static IP address, you should use a MIP.

Also you can not use a MIP to different internal IP addresses, its a 1 to 1 mapping
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
MzucchiAuthor Commented:
Not sure, I cant seem to see any activity in the Policy log that uses either MIP or VIP. I originally tried the MIP and used MIP in the policy with same results.  1 to 1 mapping is ok since there is only a hand full of hosts and enough public IP's. Is the range of IP's implied on the interface when you have multiple IP's assigned ie /28 subnet for the WAN inteface, or do you need to setup up Alias for each of the other IP's in the range. Or does that even make a difference.
0
 
MzucchiAuthor Commented:
Not sure, I cant seem to see any activity in the Policy log that uses either MIP or VIP. I originally tried the MIP and used MIP in the policy with same results.  1 to 1 mapping is ok since there is only a hand full of hosts and enough public IP's. Is the range of IP's implied on the interface when you have multiple IP's assigned ie /28 subnet for the WAN inteface, or do you need to setup up Alias for each of the other IP's in the range. Or does that even make a difference.
0
 
Sanga CollinsSystems AdminCommented:
The range of public ip addresses available is determined by the subnet mask. The juniper will not allow you to create a MIP using an IP outside the available range.

can you post the results of the following console commands

get policy
get int
get mip
get vip
0
 
MzucchiAuthor Commented:
Remote Management Console
login: netscreen
password:
ssg20-> get policy
Total regular policies 3, Default deny, Software based policy search, new policy enabled.
    ID From     To       Src-address  Dst-address  Service              Action State   ASTLCB
     3 Untrust  Trust    Any          VIP(50.73.8~ RDP                  Permit enabled ---X-X
     2 Untrust  Trust    Any          VIP(50.73.8~ RDP                  Permit enabled ---X-X
     1 Trust    Untrust  Any          Any          ANY                  Permit enabled -----X
ssg20-> get int

A - Active, I - Inactive, U - Up, D - Down, R - Ready

Interfaces in vsys Root:
Name           IP Address                        Zone        MAC            VLAN State VSD
serial0/0      0.0.0.0/0                         Null        N/A               -   D   -
eth0/0         50.73.85.33/29                    Untrust     2c21.7221.8100    -   U   -
eth0/1         66.104.135.66/27                  Untrust     2c21.7221.8105    -   D   -
bgroup0        10.1.25.1/24                      Trust       2c21.7221.8109    -   U   -
  eth0/2       N/A                               N/A         N/A               -   U   -
  eth0/3       N/A                               N/A         N/A               -   D   -
  eth0/4       N/A                               N/A         N/A               -   D   -
bgroup1        0.0.0.0/0                         Null        2c21.7221.810a    -   D   -
bgroup2        0.0.0.0/0                         Null        2c21.7221.810b    -   D   -
bgroup3        0.0.0.0/0                         Null        2c21.7221.810c    -   D   -
vlan1          0.0.0.0/0                         VLAN        2c21.7221.810f    1   D   -
null           0.0.0.0/0                         Null        N/A               -   U   -
ssg20-> get mip
Total MIPs under Root configured:3 Max:300.
--------------------------------------------------------------------------------
Map IP             Host IP         Interface   VRouter
--------------------------------------------------------------------------------
50.73.85.33/32     10.1.25.2       ethernet0/0 trust-vr
66.104.135.66/32   10.1.25.2       ethernet0/1 trust-vr
66.104.135.67/32   10.1.25.3       ethernet0/1 trust-vr
ssg20-> get vip
Virtual IP      Interface      Port/Port-range   Server                Service/Port-range(protocol)
50.73.85.34     ethernet0/0    3389              10.1.25.3(OK)         RDP
50.73.85.35     ethernet0/0    3389              10.1.25.2(OK)         RDP
50.73.85.36     ethernet0/0    0                 NONE                  NONE
50.73.85.37     ethernet0/0    0                 NONE                  NONE
ssg20->
0
 
MzucchiAuthor Commented:
Seems like my custom policy ports were too restrictive. I set to 0-65545 and it worked perfect.
0
 
QlemoC++ DeveloperCommented:
Yes, that is true. Usually you do not restrict the source port for incoming connections; only the destination port is well-known and static, the source port is dynamic and arbitrary.
0

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now