Security and network management
Firewall
isolates organization’s internal net from larger Internet, allowing some pkt to pass, blocking others
为什么要有防火墙
prevent denial of service attacks(防止已拒绝的服务的攻击)
- SYN flooding: 攻击者通过创建假冒的TCP连接
prevent illegal modification/access of internal data
- 黑客替代掉主页
allow only authorized access to inside network
- set of authenticated users/hosts
有三种类型的防火墙:
- stateless
- statefull
- application gateway
Stateless pkt filtering
占用的内存更少:不需要时刻追踪
内部网络通过router的防火墙与外部相连
router filters pkt-by-pkt,决定是forward还是drop,取决于:
- source IP address, destination IP address
- TCP/UDP source and destination port numbers
- ICMP message type
- TCP SYN and ACK bits
Stataless pkt filtering example
Block inbound TCP segment with ACK = 0 => 防止外部的client与内部的建立TCP连接
Access Control List – ACL
ACL: table of rules, applied top to bottom to incoming pkt: (action, condition) pairs: look like OpenFlow forwarding
Statefull pkt filtering
stateless pkt filter 是沉重的工具:需要设定很多规则,例如以下的规则,即使在没有TCP连接时也要被确立
stateful pkt filter
最终每一个TCP连接的状态
- 追踪建立连接的SYN,以及结束连接的FIN,以区分是incoming还是outgoing的pkt
- 在防火墙对inactive的包设立超时(timeout inactive connections at firewall)
Application gateway
在application data以及ip/tcp/udp上对包进行过滤
- 例如: 允许内部特定用户访问外部网络
要求:
- 内部所有users都要经过gataway再出到外网
- 对于授权的用户来说,使用gateway来确立到dest host的连接
- router filter会阻挡全部未经过application gateway的包