가장 평범한 구성을 예로 들어 설명 한다.
1) Two Interfaces without NAT
먼저 Client의 default gateway는 PIX의 Inside ip address가 된다.
우선 일반 시스코라우터와 동일 하게 Conf t로 들어 가서 명령어를 입력한다.
(2개의 인터페이스를 가지고 있는 PIX를 예로 들어 설명한다.
PIX가 처음으로 Booting 하면 아래와 같이 pixfirewall>
pixfirewall> en
Password:
Enter enable and press the Enter key.
그리고, wr t 를 치면 현재의 configuration을 확인 가능 하다.
아래는 default configuration이다.
PIX Version 5.3(1)
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfirewall
fixup protocol ftp 21
fixup protocol http 80
fixup protocol h323 1720
fixup protocol rsh 514
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol sip 5060
names
pager lines 24
logging on
no logging timestamp
no logging standby
no logging console
no logging monitor
no logging buffered
no logging trap
no logging history
logging facility 20
logging queue 512
interface ethernet0 auto shutdown
interface ethernet1 auto shutdown
mtu outside 1500
mtu inside 1500
ip address outside 127.0.0.1 255.255.255.255
ip address inside 127.0.0.1 255.255.255.255
ip audit info action alarm
ip audit attack action alarm
arp timeout 14400
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h323
0:05:00 si
p 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server RADIUS protocol radius
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
no sysopt route dnat
isakmp identity hostname
telnet timeout 5
ssh timeout 5
terminal width 80
Cryptochecksum:d41d8cd98f00b204e9800998ecf8427e
: end
[OK]
자 이제부터 기본 적인 configuraion을 해보자.
우선 각 인터페이스의 속도를 맞춘다.
처음에는
interface ethernet0 auto shutdown
interface ethernet1 auto shutdown로 되어 있다.
Shutdown을 해지하는 방법은 위의 명령어에서 shutdown없이 그대로 치면 된
다.
그리고,
10baset for 10 Mbps Ethernet half duplex communication,
10full for 10 Mbps Ethernet full duplex communication,
100basetx for 100 Mbps Ethernet half duplex communication,
100full for 100 Mbps Ethernet full duplex communication,
1000sxfull for 1000 Mbps Gigabit Ethernet full duplex operation,
or 1000basesx for 1000 Mbps Gigabit Ethernet half duplex operation.
For Token Ring interfaces, auto-sensing is not supported;
use either 4mbps or 16mbps depending on the speed of the interface.
An interface speed is not specified for FDDI interfaces. Cisco
recommends that you do not use the auto option.
아래에서는 100Mbps Full로 고정시킨 것이다.
pixfirewall# conf t
pixfirewall(config)# interface ethernet0 100full
pixfirewall(config)# interface ethernet1 100full
그 다음은 인터페이스의 ip address를 설정한다.
ip address outside 209.165.201.3 255.255.255.224
ip address inside 172.31.2.100 255.255.255.0
그리고, 여기에서 NAT를 사용하지 않으므로 아래와 같이 내부 네트웍을 설정한다.
nat (inside) 0 172.31.2.0 255.255.255.0
그리고, 외부에 내부 네트웍이 보이도록 아래의 설정을 한다.
static (inside,outside) 172.31.2.0 172.31.2.0 netmask 255.255.255.0
이제는 라우트를 설정한다.
Outside 쪽의 default 경로 이다.
route outside 0.0.0.0 0.0.0.0 209.165.201.2 1
위의 그림에서는 모든 client가 PIX로 직접 연결되어 있으므로 inside 쪽 Route는 설정할 필요가 없다.
그러나, PIX 내부에 여러대의 라우터가 있어 별도의 route를 설정해 주어야 하는 경우는
route outside 192.168.1.0 255.255.255.0 next_hop_router_ip_address
metric
위의 방식으로 설정한다.
그리고, 별도로 PIX 앞단(OUTSIDE) 쪽의 라우터에서는 Static하게
172.31.2.0 네트웍으로
갈때는 209.165.201.3(PIX의 Outside)로 가도록 지정되어 있어야한다.
그리고, 이제는 Access-list 설정 부분이다.
PIX는 기본적으로 내부에서 외부로는 모두나가며, 외부에서 내부로는 들어올 수 없다.
그러므로, 외부에서 내부의 서버를 access하기 위해서는 permit해 주어야한다.
그리고, 내부에서 외부로 나가는 traffic을 control 하기 위해서는 deny 시키는 방식이다.
예를 들면, 외부에서도 내부로 ping이 되게 하기 위해서는
access-list acl_out permit icmp any any
access-group acl_out in interface outside
로 설정하면 된다. 나머지 Accesss-list도 시스코 라우터와 동일하다.
만일, PIX에 Access-list를 걸지 못한다면, 시스코 라우터에 access-list를 설정할 줄 모른다고 해야 옳다.
그리고, 원래 PIX로의 telnet은 내부에서 만 가능하며, 만일 외부에서 Telnet을 하려면 vpn을 설치 해야 만 한다.
만일 내부의 사용자 172.32.2.101 만 telnet을 허용하려면,telnet 172.32.2.101 255.255.255.255 inside
이라고 설정하면 끝이다. Default로 telnet password는 cisco이며 passwd 로 변경 가능하다.
이제까지의 configuation을 정리한다.
<wr t >
pixfirewall# conf t
pixfirewall(config)# interface ethernet0 100full
pixfirewall(config)# interface ethernet1 100full
ip address outside 209.165.201.3 255.255.255.224
ip address inside 172.31.2.100 255.255.255.0
nat (inside) 0 172.31.2.0 255.255.255.0
static (inside,outside) 172.31.2.0 172.31.2.0 netmask 255.255.255.0
route outside 0.0.0.0 0.0.0.0 209.165.201.2 1
access-list acl_out permit icmp any any
access-group acl_out in interface outside
telnet 172.32.2.101 255.255.255.255 inside
그리고, 아래의 설정은 211.174.0.111이 Web Server, Mail Server 기능을 수행하고 외부의 DNS를 사용할때의 기본 Access-list이다.
access-list acl_out permit tcp any host 211.174.0.111 eq www
access-list acl_out permit tcp any host 211.174.0.111eq smtp
access-list acl_out permit tcp any host 211.174.0.111 eq pop3
access-list acl_out permit tcp any host 211.174.0.111 eq nntp
access-list acl_out permit tcp any any eq domain
access-list acl_out permit udp any any eq domain
위와 같이만 하면 내부 사용자는 인터넷을 사용가능하다.
이제는 NAT를 사용할 때이다.
Two Interfaces with NAT
NAT를 사용할 내부 네트웍을 지정하는 부분만 위와 다르다.
NAT를 사용하지 않을 경우 nat 0를 사용하고 nat를 사용하면 1부터 사용하면 된다.
특정 네트웍을 주어도 되고 모든 내부 사용자가 NAT의 적용을 받아야 한다
면 아래처럼 설정하면 된다.
nat (inside) 1 0.0.0.0 0.0.0.0
그리고, 아래처럼 공인 어드레스를 설정하면된다.(앞의 번호 1이 서로 일치
하여야 한다.)
global (outside) 1 209.165.201.6-209.165.201.8 netmask 255.255.255.224
그리고, PAT를 사용 할 경우에는
global (outside) 1 209.165.201.10 netmask 255.255.255.224 처럼 하나의 address만 주면 된다.
그리고, 외부에서 access 가능하도록 해주어야 되는 서버는 address를 고정 시킨다.
static (inside, outside) 209.165.201.12 10.1.1.3 netmask 255.255.255.255 0 0
나머지 access-list 적용은 일반 라우터와 동일 하다. 위의 configuration을 보자
ip address inside 10.1.1.1 255.255.255.0
ip address outside 209.165.201.1 255.255.255.224
nat (inside) 1 0.0.0.0 0.0.0.0
nat (inside) 2 192.168.3.0 255.255.255.0
global (outside) 1 209.165.201.6-209.165.201.8 netmask
255.255.255.224
global (outside) 1 209.165.201.10 netmask 255.255.255.224
global (outside) 2 209.165.200.225-209.165.200.254 netmask
255.255.255.224
access-list acl_in deny tcp host 192.168.3.3 any eq 1720
access-list acl_in deny tcp any any eq 80
access-list acl_in permit host 192.168.3.3 any eq 80
access-list acl_in permit host 10.1.1.11 any eq 80
access-group acl_in interface inside
route outside 0 0 209.165.201.4 1
static (inside, outside) 209.165.201.12 10.1.1.3
netmask 255.255.255.255 0 0
access-list acl_out permit tcp any host 209.165.201.12 eq smtp
access-list acl_out permit tcp any host 209.165.201.12 eq 113
access-group acl_out in interface outside
=>위의 설정을 응용해서 해보면 어지간한 구성은 모두 된다.
그리고, 위의 그림에서 특히 주의 해야 할 점은 PIX는 라우터가 아니다.
그러므로, PIX 밑에 직접 연결된 client들이 옆의 네트웍과 통신하기 위해서는
default gateway가 PIX가 아니라 라우터로 잡아야 한다.
그리고, 상세히 PIX에 관해서 공부하려면 아래의 url을 참조하기 바란다.
http://www.cisco.com/univercd/cc/td/doc/product/iaabu/pix/pix_v52/conf
ig/index.htm