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

port fowarding on SSG5

Hi All,

A device on the SSG5 Untrust network needs to communicate with a public IP address on the Internet via http. does anyone have procedures or the commands for this.  What about vice versa if an outside source wants to communicate via port 80 to a server on the Untrust network.  
0
cisco20
Asked:
cisco20
  • 5
  • 2
  • 2
2 Solutions
 
deimarkCommented:
There e are several different ways to implement NAT on the screenos firewall bud

The basic breakdown is:

Interface NAT -Used for outbound traffic from the trsut side of the firewall to the untrust.  Its like dynamic hide nat, ie it will hide the internal host behind the external interface IP,  Supports PAT

Mapped IP (MIP) - Static 1 to 1 mapping both both inbound and outbound NAT

Virtual IP (VIP) - method for nat dest for inbound traffic, ie internal host needs to be accessed from the outside using an external IP.  This support mapping different servcices to different internal IPs, ie mail traffic can be redirected to mail server, web traffic redirected to web server, both using same public IP

Nat destination - similar to VIP as above, can redirect specific ports to different internal servers

HTH
0
 
mindwiseCommented:
Hi Cisco20,

Does that device have a private ip address ?
If not, you'll just need to allow traffic via an "untrust intra zone" policy... (a policy both 'from' as wel as ' to'  the untrust zone).

If it does have a private ip, that "untrust intra zone policy" will need to have 'nat-src' ticked. (outbound)
For reverse traffic (traffic initiated from 'internet'), i'd go for a 'VIP" since 'nat-dst' can be a bit tricky to set up (wrt proxy-arp etc).

so "What about vice versa if an outside source wants to communicate via port 80 to a server on the Untrust network.  "

- create a VIP ip address on the interface that traffic will hit on the ssg (i guess eth0/0).
(or create it "same as interface ip")
- create a VIP service for port 80 to http and set the 'host' ip as the ip adress of 'the device".
- create a policy permitting traffic from untrust to global, where the destination is the 'vip' you just created and the port is http (obviously :)

If that server does have a public IP which is routed via the e0/0 of the ssg, then a normal policy from untrust to untrust should do.

I guess the '2 networks on 'untrust' question was also yours, why not place that 'server' network in the DMZ ?

Have fun.
0
 
cisco20Author Commented:
Hi again,
First time configuring netscreen OS and  this is all starting to make more sense with just a couple posts with great answers.. Thanks guys.

the '2 networks on 'untrust'  :The DMZ portion of this setup is going to be reserved for another server installed at a later date and with similar access functions as the one we are setting up now. The more I think about it if it's only a one off server I can create it's own zone when the time comes and use the DMZ for the 2nd network.....hmm

As far as the device public IP - yes the server has private ip and only my internet connection has one static ip.

0
KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

 
cisco20Author Commented:
Just noticed - you can't bind any ports to the DMZ area, only 0/1 avaolable ?
0
 
deimarkCommented:
The only reason for you not being able to bind a port to a zone is a previous binding with config.

Remove the binding config and then move the port where you wish
0
 
cisco20Author Commented:
I don't want to move it I just wanted to bind another port like 0/2 to the DMZ.
0
 
mindwiseCommented:
And is i.e. ETH0/2 part of a bridgegroup ?

:)
0
 
cisco20Author Commented:
Don't think so...here's my config

Interface ethernet0/2:
  description Local_Lan_Network
  number 6, if_info 528, if_index 0
  link down, phy-link down
  vsys Root, zone Null, vr untrust-vr
  admin mtu 0, operating mtu 1500, default mtu 1500
  *ip 0.0.0.0/0   mac 0026.884c.d786
  pmtu-v4 disabled
  ping disabled, telnet disabled, SSH disabled, SNMP disabled
  web disabled, ident-reset disabled, SSL disabled

  NHRP disabled
  bandwidth: physical 0kbps, configured egress [gbw 0kbps mbw 0kbps]
             configured ingress mbw 0kbps, current bw 0kbps
             total allocated gbw 0kbps



> get config
Total Config size 6121:

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 "labtest"
set admin manager-ip 163.146.67.xxx 255.255.255.255
set admin manager-ip 10.20.6.1 255.255.255.0
set admin manager-ip 163.146.67.xx 255.255.255.255
set admin manager-ip 175.61.73.xxx 255.255.255.255
set admin auth web timeout 10
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 id 100 "VPN_Zone"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" block
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
set zone "VPN_Zone" 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 bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
unset interface vlan1 ip
set interface ethernet0/0 ip 99.25.198.147/29
set interface ethernet0/0 route
set interface ethernet0/1 ip 10.25.0.1/16
set interface ethernet0/1 nat
set interface bgroup0 ip 10.20.6.1/24
set interface bgroup0 nat
set interface ethernet0/0 gateway 99.25.198.150
set interface "ethernet0/2" description "Local_Lan_Network"
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
set interface ethernet0/1 ip manageable
set interface bgroup0 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/0 manage ssh
set interface ethernet0/0 manage telnet
set interface ethernet0/0 manage snmp
set interface ethernet0/0 manage ssl
set interface ethernet0/0 manage web
set interface ethernet0/0 manage mtrace
set interface ethernet0/1 manage ssh
set interface ethernet0/1 manage telnet
set interface ethernet0/1 manage web
set interface bgroup0 manage mtrace
set interface ethernet0/1 dhcp server service
set interface bgroup0 dhcp server service
set interface ethernet0/1 dhcp server enable
set interface bgroup0 dhcp server auto
set interface ethernet0/1 dhcp server option lease 1440000
set interface ethernet0/1 dhcp server option gateway 10.25.0.1
set interface ethernet0/1 dhcp server option netmask 255.255.0.0
set interface bgroup0 dhcp server option lease 1440000
set interface bgroup0 dhcp server option gateway 10.20.6.1
set interface bgroup0 dhcp server option netmask 255.255.255.0
set interface ethernet0/1 dhcp server ip 10.25.0.101 to 10.25.0.254
set interface bgroup0 dhcp server ip 10.20.6.101 to 10.20.6.254
unset interface ethernet0/1 dhcp server config next-server-ip
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 11520
set interface "serial0/0" modem retry 3
set interface "serial0/0" modem interval 10
set interface "serial0/0" modem idle-time 10
set tcp mss 1300
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 console page 18
set domain mycompanycorp.com
set hostname labtest
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 168.94.156.1 src-interface ethernet0/0
set dns host dns2 168.94.157.1 src-interface ethernet0/0
set dns host dns3 0.0.0.0
set address "Trust" "10.20.16.1/32" 10.20.16.1 255.255.255.255
set address "Trust" "10.20.16.101/32" 10.20.16.101 255.255.255.255
set address "Untrust" "10.25.16.101/32" 10.25.16.101 255.255.255.255
set address "Untrust" "163.146.67.xxx/32" 163.146.67.xxx 255.255.255.255
set address "V1-Trust" "10.25.16.101/24" 10.25.16.101 255.255.255.0
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 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 policy id 4 from "Untrust" to "Trust"  "Any" "Any" "ANY" permit
set policy id 4
exit
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set ssh enable
set config lock timeout 5
unset license-key auto-update
set snmp port listen 161
set snmp port trap 162
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
0
 
cisco20Author Commented:
Thanks again for the great info.
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

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