由于采用JUNOS软件,所以操作起来很容易上手,配置命令和Juniper路由器近似。
和Firewall相关的配置主要包括:
1 Zone
1.1 Zone的基本概念
和其他厂家防火墙比较类似的是,SRX上也有相应的术语。包括Routing Instance,是一个路由实例的划分,简单可以理解成一个逻辑路由器。RI下面可以划分Zone,是不同的安全区域。Zone下面分配不同的接口提供和外部的连通性服务。
1.2 Zone的类型
1)用户定义的Zone(特点是可配置)
- 包括Security Zone和Functional Zone。
2)系统默认的Zone(不可配置)
- 包括junos-global zone和none zone。前者作为static NAT addresses的存储。所有的接口默认均属于Null zone,当接口从一个zone中删除,该接口会重新属于Null zone,所有属于Null zone的接口均不能传输数据。
一 Security Zone(安全区)
最重要的Zone。所有的业务接口都将放到这个Security Zone中。由一个或多个网段利用策略进行出、入流量的控制,用于用户的业务数据流量传输,没有默认定义的security zones,同一个zone不能属于不同的routing instances。
二 Functional Zone(功能区)
目前只有一个management zone用于带外网管。不能指定策略。不能传输用户数据。一个设备只能定义一个management zone。
三 出厂时的默认Zone:
出厂配置只定义了两个安全区,一个trust,一个untrust。其中trust安全区默认包括ge-0/0/0.0接口。untrust默认没有接口。
1.3 Zone的配置
1.3.1 配置流程
一 定义一个安全区或功能区
二 为这个区加入逻辑接口
三 可选的,为这个区域添加允许的协议和服务
(如果第三步忽略的话,则默认所有流量都将被拒绝)。
举例:
1 Define a security zone or a functional zone:
user@host# set security zones security-zone zone-name
2 Add logical interfaces to a zone:
[edit security zones]
user@host# set security-zone HR interfaces ge-0/0/1.0
3 制定Zone的策略:
1)默认直接访问SRX的流量都是禁止的:(也就是说不能直接对它进行telnet)
可利用host-inbound-traffic 参数来控制哪些流量允许从zone或接口访问SRX设备。
2)所有从SRX设备本身往外访问的流量都是允许的。
举例:
[edit security zones]
user@host# set security-zone HR host-inbound-traffic system-services all
或:
[edit security zones]
user@host# set security-zone HR interfaces ge-0/0/1 host-inbound-traffic system-services http
注意:接口下的策略配置将覆盖安全区下的策略配置。host-inbound-traffic选项后面可以配置允许的服务、协议以及例外选项。
1.4 Zone的监控
1) show security zones 命令来监控Zone的情况。包括Zone的类型、名字、绑定的接口等信息。
例如:
Security zone: HR
Send reset for non-SYN session TCP packets: Off
Policy configurable: Yes
Interfaces bound: 1
Interfaces:
ge-0/0/1.0
2)show interfaces interface-name extensive 命令可以监控和接口相关的特定的Zone的信息。
例如:
user@host> show interfaces ge-0/0/3.200 extensive
Logical interface ge-0/0/3.200 (Index 69) (SNMP ifIndex 47) (Generation 136)
Flags: SNMP-Traps VLAN-Tag [ 0x8100.200 ] Encapsulation: ENET2
Traffic statistics:
…
Security: Zone: trust
Allowed host-inbound traffic : bootp bfd bgp dlsw dns dvmrp igmp ldp msdp
nhrp ospf pgm pim rip router-discovery rsvp sap vrrp dhcp finger ftp tftp
ident-reset http https ike netconf ping rlogin rpm rsh snmp snmp-trap ssh
telnet traceroute xnm-clear-text xnm-ssl lsping
Flow Statistics :
Flow Input statistics :
Self packets : 0
ICMP packets : 0
VPN packets : 0
Bytes permitted by policy : 4788966
Connections established : 2
Flow error statistics (Packets dropped due to):
Address spoofing: 0
Authentication failed: 0
Incoming NAT errors: 0
Invalid zone received packet: 0
Multiple user authentications: 0
Multiple incoming NAT: 0
No parent for a gate: 0
No one interested in self packets: 0
No minor session: 0
No more sessions: 0
No NAT gate: 0
No route present: 0
No SA for incoming SPI: 0
No tunnel found: 0
No session for a gate: 0
No zone or NULL zone binding 0
Policy denied: 0
Security association not active: 0
TCP sequence number out of window: 0
Syn-attack protection: 0
User authentication errors: 0