ScreenOS Firewalls (NOT SRX)
Reply
Contributor
Danipaan
Posts: 32
Registered: ‎12-22-2008
0

[SSG-5] RDP

We are trying to connect one of our servers (172.16.4.97) directly to the internet to connect through RDP. I checked, double-checked, re-checked every setting. It is still not working, i'm trying to get it to work using VIP.

 

Config:

ssg5-serial-> get config
Total Config size 9923:
set clock ntp
set clock timezone 1
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 "MyGRE" protocol 47 src-port 0-65535 dst-port 2048-2048
set service "GREcustom" protocol tcp src-port 0-65535 dst-port 47-47
set service "PPTP Custom" protocol tcp src-port 0-65535 dst-port 1723-1723
set service "PPTP Custom" + tcp src-port 0-65535 dst-port 47-47
set service "RDP-TS" protocol tcp src-port 0-65535 dst-port 3389-3389
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-server "Radius_or_SecurID" id 2
set auth-server "Radius_or_SecurID" server-name "172.16.4.199"
set auth-server "Radius_or_SecurID" account-type xauth
set auth-server "Radius_or_SecurID" type securid
set auth default auth server "Local"
set auth radius accounting port 1646
set admin name "administrator"
set admin password "x"
set admin port 8080
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 id 100 "VPN"
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
set zone "DMZ" tcp-rst
set zone "VLAN" block
unset zone "VLAN" tcp-rst
unset zone "VPN" 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 "ethernet0/2" zone "Trust"
set interface "bgroup0" zone "Trust"
set interface "tunnel.1" zone "VPN"
unset interface vlan1 ip
set interface ethernet0/0 ip 10.10.10.10/24
set interface ethernet0/0 route
set interface ethernet0/2 ip 172.16.6.1/16
set interface ethernet0/2 route
set interface ethernet0/0 bandwidth egress mbw 768 ingress mbw 768
set interface tunnel.1 mtu 1500
set interface ethernet0/0 proxy dns
set interface ethernet0/2 proxy dns
set interface bgroup0 proxy dns
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
set interface ethernet0/2 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/0 manage telnet
set interface ethernet0/0 manage web
unset interface ethernet0/2 manage ssh
unset interface ethernet0/2 manage snmp
unset interface ethernet0/2 manage ssl
set interface bgroup0 manage mtrace
set interface ethernet0/0 vip interface-ip 2048 "MyGRE" 172.16.4.199 manual
set interface ethernet0/0 vip interface-ip 25 "SMTP" 172.16.4.100 manual
set interface ethernet0/0 vip interface-ip 80 "HTTP" 172.16.4.100 manual
set interface ethernet0/0 vip interface-ip 1723 "PPTP Custom" 172.16.4.199 manua
l
set interface ethernet0/0 vip interface-ip 47 "GREcustom" 172.16.4.199 manual
set interface ethernet0/0 vip interface-ip 443 "HTTPS" 172.16.4.100 manual
set interface ethernet0/0 vip interface-ip 3389 "RDP-TS" 172.16.4.97
set interface ethernet0/1 dhcp client enable
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 dns host dns1 194.109.6.66 src-interface ethernet0/0
set dns host dns2 194.109.104.104 src-interface ethernet0/2
set dns host dns3 10.10.10.1 src-interface ethernet0/0
set dns proxy
set dns proxy enable
set dns server-select domain domain.com outgoing-interface ethernet0/2 prim
ary-server 194.109.104.104 secondary-server 194.109.6.66 tertiary-server 10.10.1
0.1 failover
set dns server-select domain * outgoing-interface ethernet0/0 primary-server 194
.109.104.104 secondary-server 194.109.6.66 tertiary-server 10.10.10.1 failover
set address "Trust" "172.16.0.0/16" 172.16.0.0 255.255.0.0
set address "Trust" "172.16.4.0/24" 172.16.4.0 255.255.255.0
set address "Trust" "172.16.4.0/32" 172.16.4.0 255.255.255.255
set address "Trust" "172.16.5.0/24" 172.16.5.0 255.255.255.0
set address "VPN" "172.16.5.0/24" 172.16.5.0 255.255.255.0
set ippool "VPN DHCP POOL" 172.16.5.200 172.16.5.225
set user "vpn@customer.com" uid 6
set user "vpn@customer.com" ike-id u-fqdn "vpn@customer.com" share-limit 25
set user "vpn@customer.com" type ike
set user "vpn@customer.com" "enable"
set user-group "IKE VPN User grouo" id 2
set user-group "IKE VPN User grouo" user "vpn@customer.com"
set ike gateway "VPN CLIENTS" dialup "IKE VPN User grouo" Aggr outgoing-interfac
e "ethernet0/0" preshare "adykg18TNK2loEsXGWCVzMRKGRnLaUGGZA==" proposal "pre-g2
-aes128-sha"
set ike gateway "VPN CLIENTS" nat-traversal udp-checksum
set ike gateway "VPN CLIENTS" nat-traversal keepalive-frequency 5
set ike gateway "VPN CLIENTS" xauth server "Radius_or_SecurID"
unset ike gateway "VPN CLIENTS" xauth do-edipi-auth
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 xauth default ippool "VPN DHCP POOL"
set xauth default dns1 172.16.4.100
set xauth default dns2 172.16.4.195
set xauth default wins1 172.16.4.100
set vpn "vpn cLIENTS" gateway "VPN CLIENTS" no-replay tunnel idletime 0 proposal
"g2-esp-aes128-sha"
set vpn "vpn cLIENTS" id 0x4 bind interface tunnel.1
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
set l2tp default dns1 172.16.4.100
set l2tp default ippool "VPN DHCP POOL"
set l2tp default wins1 172.16.4.100
set l2tp "WindowsVPN-l2tp" id 3 outgoing-interface ethernet0/0
set traffic-shaping mode off
set url protocol websense
exit
set anti-spam profile ns-profile
set sbl default-server enable
set default action drop
exit
set vpn "vpn cLIENTS" proxy-id local-ip 0.0.0.0/0 remote-ip 255.255.255.255/32 "
ANY"
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" nat src permit log
set policy id 1 disable
set policy id 1
exit
set policy id 27 from "Trust" to "Untrust"  "Any" "Any" "PPTP" permit log count
set policy id 27
exit
set policy id 65 from "Trust" to "Untrust"  "Any" "Any" "GRE" permit log count
set policy id 65
exit
set policy id 66 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "PPTP" perm
it log count traffic gbw 512 priority 1 mbw 768
set policy id 66
exit
set policy id 67 name "vpn cLIENTS Allowed" from "VPN" to "Trust"  "172.16.5.0/2
4" "172.16.0.0/16" "ANY" nat src permit log
set policy id 67
exit
set policy id 68 from "VPN" to "Untrust"  "172.16.5.0/24" "Any" "ANY" nat src pe
rmit log
set policy id 68
exit
set policy id 71 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "HTTP" perm
it log
set policy id 71
exit
set policy id 72 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "SMTP" perm
it log
set policy id 72 anti-spam ns-profile
set policy id 72
exit
set policy id 73 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "HTTPS" per
mit log
set policy id 73
exit
set policy id 74 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "GRE" permi
t log
set policy id 74
exit
set policy id 75 from "Trust" to "Untrust"  "172.16.4.0/24" "Any" "ANY" nat src
permit log traffic gbw 256 mbw 384
set policy id 75
exit
set policy id 76 from "Trust" to "Untrust"  "172.16.5.0/24" "Any" "ANY" nat src
permit log traffic gbw 512 priority 0 mbw 768
set policy id 76
exit
set policy id 77 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "RDP-TS" pe
rmit log
set policy id 77
exit
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set config lock timeout 5
unset license-key auto-update
set ssl port 4343
set ntp server "200.49.40.1"
set ntp server src-interface "ethernet0/0"
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 0.0.0.0/0 interface ethernet0/0 gateway 10.10.10.1 preference 20
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
ssg5-serial->

Contributor
Danipaan
Posts: 32
Registered: ‎12-22-2008
0

Re: [SSG-5] RDP

Below is the outcome of the debug flow basic

 

 
ssg5-serial-> get db stream
****** 13147556.0: <Self/self> packet received [128]******
  ipid = 15160(3b38), @02890fd4
flow_self_vector2: send pack with current vid =0, enc_size:0
  processing packet through normal path.
  packet passed sanity check.
  self:172.16.6.1/56664->172.16.4.97/1024,1(8/0)<Root>
  no session found
  created new session from self  7565
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
  policy id = 320000(Deny), tunnel = 0
  search route to (null, 0.0.0.0->172.16.4.97) in vr trust-vr for vsd-0/flag-200
0/ifp-ethernet0/2
  [ Dest] 3.route 172.16.4.97->172.16.4.97, to ethernet0/2
  routed 172.16.4.97 next hop 172.16.4.97, from self
  existing vector list 0-2b2d984.
  processing packet from self
  flow_first_install_session======>
  route to 172.16.4.97
  arp entry found for 172.16.4.97
  ifp2 ethernet0/2, out_ifp ethernet0/2, flag 00800600, tunnel ffffffff, rc 1
  outgoing wing prepared, ready
  flow got session.
  flow session id 7565
  skip ttl adjust for packet from self.
  post addr xlation: 172.16.6.1->172.16.4.97.
 flow_send_vector_, vid = 0, is_layer2_if=0
  packet send out to 00155d046000 through ethernet0/2
****** 13147556.0: <Trust/ethernet0/2> packet received [128]******
  ipid = 9962(26ea), @03331310
  packet passed sanity check.
  ethernet0/2:172.16.4.97/1024->172.16.6.1/56664,1(0/0)<Root>
  existing session found. sess token 3
  flow got session.
  flow session id 7565
  post addr xlation: 172.16.4.97->172.16.6.1.
  packet is for self, copy packet to self
copy packet to us.
****** 13147560.0: <Self/self> packet received [128]******
  ipid = 15161(3b39), @02890fd4
flow_self_vector2: send pack with current vid =0, enc_size:0
  processing packet through normal path.
  packet passed sanity check.
  self:172.16.6.1/56764->172.16.4.97/1024,1(8/0)<Root>
  no session found
  created new session from self  7565
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
  policy id = 320000(Deny), tunnel = 0
  search route to (null, 0.0.0.0->172.16.4.97) in vr trust-vr for vsd-0/flag-200
0/ifp-ethernet0/2
  [ Dest] 3.route 172.16.4.97->172.16.4.97, to ethernet0/2
  routed 172.16.4.97 next hop 172.16.4.97, from self
  existing vector list 0-2b2d984.
  processing packet from self
  flow_first_install_session======>
  route to 172.16.4.97
  arp entry found for 172.16.4.97
  ifp2 ethernet0/2, out_ifp ethernet0/2, flag 00800600, tunnel ffffffff, rc 1
  outgoing wing prepared, ready
  flow got session.
  flow session id 7565
  skip ttl adjust for packet from self.
  post addr xlation: 172.16.6.1->172.16.4.97.
 flow_send_vector_, vid = 0, is_layer2_if=0
  packet send out to 00155d046000 through ethernet0/2
****** 13147560.0: <Trust/ethernet0/2> packet received [128]******
  ipid = 9963(26eb), @03332310
  packet passed sanity check.
  ethernet0/2:172.16.4.97/1024->172.16.6.1/56764,1(0/0)<Root>
  existing session found. sess token 3
  flow got session.
  flow session id 7565
  post addr xlation: 172.16.4.97->172.16.6.1.
  packet is for self, copy packet to self
copy packet to us.
****** 13147564.0: <Self/self> packet received [128]******
  ipid = 15162(3b3a), @02890fd4
flow_self_vector2: send pack with current vid =0, enc_size:0
  processing packet through normal path.
  packet passed sanity check.
  self:172.16.6.1/56864->172.16.4.97/1024,1(8/0)<Root>
  no session found
  created new session from self  7551
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
  policy id = 320000(Deny), tunnel = 0
  search route to (null, 0.0.0.0->172.16.4.97) in vr trust-vr for vsd-0/flag-200
0/ifp-ethernet0/2
  [ Dest] 3.route 172.16.4.97->172.16.4.97, to ethernet0/2
  routed 172.16.4.97 next hop 172.16.4.97, from self
  existing vector list 0-2b2d984.
  processing packet from self
  flow_first_install_session======>
  route to 172.16.4.97
  arp entry found for 172.16.4.97
  ifp2 ethernet0/2, out_ifp ethernet0/2, flag 00800600, tunnel ffffffff, rc 1
  outgoing wing prepared, ready
  flow got session.
  flow session id 7551
  skip ttl adjust for packet from self.
  post addr xlation: 172.16.6.1->172.16.4.97.
 flow_send_vector_, vid = 0, is_layer2_if=0
  packet send out to 00155d046000 through ethernet0/2
****** 13147564.0: <Trust/ethernet0/2> packet received [128]******
  ipid = 9964(26ec), @03332b10
  packet passed sanity check.
  ethernet0/2:172.16.4.97/1024->172.16.6.1/56864,1(0/0)<Root>
  existing session found. sess token 3
  flow got session.
  flow session id 7551
  post addr xlation: 172.16.4.97->172.16.6.1.
  packet is for self, copy packet to self
copy packet to us.
****** 13147568.0: <Self/self> packet received [128]******
  ipid = 15165(3b3d), @02890fd4
flow_self_vector2: send pack with current vid =0, enc_size:0
  processing packet through normal path.
  packet passed sanity check.
  self:172.16.6.1/56964->172.16.4.97/1024,1(8/0)<Root>
  no session found
  created new session from self  7551
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
swrs_search_ip: policy matched id/idx/action = 320000/-1/0x0
  policy id = 320000(Deny), tunnel = 0
  search route to (null, 0.0.0.0->172.16.4.97) in vr trust-vr for vsd-0/flag-200
0/ifp-ethernet0/2
  [ Dest] 3.route 172.16.4.97->172.16.4.97, to ethernet0/2
  routed 172.16.4.97 next hop 172.16.4.97, from self
  existing vector list 0-2b2d984.
  processing packet from self
  flow_first_install_session======>
  route to 172.16.4.97
  arp entry found for 172.16.4.97
  ifp2 ethernet0/2, out_ifp ethernet0/2, flag 00800600, tunnel ffffffff, rc 1
  outgoing wing prepared, ready
  flow got session.
  flow session id 7551
  skip ttl adjust for packet from self.
  post addr xlation: 172.16.6.1->172.16.4.97.
 flow_send_vector_, vid = 0, is_layer2_if=0
  packet send out to 00155d046000 through ethernet0/2
****** 13147568.0: <Trust/ethernet0/2> packet received [128]******
  ipid = 9965(26ed), @03336310
  packet passed sanity check.
  ethernet0/2:172.16.4.97/1024->172.16.6.1/56964,1(0/0)<Root>
  existing session found. sess token 3
  flow got session.
  flow session id 7551
  post addr xlation: 172.16.4.97->172.16.6.1.
  packet is for self, copy packet to self
copy packet to us.
Distinguished Expert
Screenie
Posts: 1,073
Registered: ‎01-10-2008
0

Re: [SSG-5] RDP

Hi,

 

it seems to me this is debug output from a ping fron the firewall self, not from a transit RDP session. Can you check the flowfilter setting with get ff and debug again with a correct filter?

best regards,

Screenie.
Juniper Ambassador,
JNCIA IDP AC WX JNCIS FW SSL JNCIP SEC ENT SP JNCI

If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.
Contributor
blueseabin
Posts: 56
Registered: ‎11-03-2008
0

Re: [SSG-5] RDP

Donot could help you or not. The steps could be first :

 

1.Network accessibility from your desktop to the target Server, put all the policy permit (Ping, traceroute), check the routing table in the network.

 

2. Once the network is ready, deny all the policy and open the firewall port . Check the service then.

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.