Nhiệm vụ 3: Cấu hình địa chỉ global, NAT, và định tuyến cho giao diện inside và outside

Một phần của tài liệu Tài liệu Chapter 5 : Cấu hình cơ bản PIX Firewall pdf (Trang 41 - 46)

diện inside và outside

Để thực hiện cấu hình global address pool, NAT, và định tuyến thực hiện các bước sau:

Bước 1: gán một pool của NIC – địa chỉ IP đã được đăng ký để swe dụng kết nối bên ngoài

pixP(config)# show global

global (outside) 1 192.168.P.20-192.168.P.254 netmask 255.255.255.0 (P = pod number)

Bước 2: cấu hình PIX Firewall để cho phép tất cả các host inside để sử dụng NAT cho việc truyền ra

pixP(config)# nat (inside) 1 0 0

Bước 3: Hiển thị cấu hình NAT hiện tại

pixP(config)# show nat

nat (inside) 1 0.0.0.0 0.0.0.0 0 0

Bước 4: gán tuyến đường mặc định

pixP(config)# route outside 0 0 192.168.P.1

Bước 5: Hiển thị cấu hình tuyến đường hiện tại

pixP(config)# show route

outside 0.0.0.0 0.0.0.0 192.168.P.1 1 OTHER static

inside 10.0.P.0 255.255.255.0 10.0.P.1 1 CONNECT static dmz 172.16.P.0 255.255.255.0 172.16.P.1 1 CONNECT static outside 192.168.P.0 255.255.255.0 192.168.P.2 1 CONNECT static

Bước 6: ghi cấu hình hiện tại vào bộ nhớ Flash

pixP(config)# write memory

Bước 7: Hiển thị một danh sách các câu lệnh được nhập gần đây nhất

pixP(config)# show history

interface e0 100full interface e1 100full interface e2 100full show interface ip address outside 192.168.P.2 255.255.255.0 ip address inside 10.0.P.1 255.255.255.0 ip address dmz 172.16.P.1 255.255.255.0 show ip address write memory exit

configure terminal

global (outside) 1 192.168.P.20-192.168.P.254 netmask 255.255.255.0 show global nat (inside) 1 0 0 show nat route outside 0 0 192.168.P.1 show route write memory show history

Note: bạn có thể sử dụng mũi tên lên xuống trên bàn phím để gọi lại các lệnh

Bước 8: Ghi cấu hình hiện tại ra terminal và kiểm tra rằng bạn nhập các lệnh trước đó chính xác

pixP(config)# write terminal

Building configuration... : Saved

:

PIX Version 5.3(1)

nameif ethernet0 outside security0 nameif ethernet1 inside security100 nameif ethernet2 dmz security50 nameif ethernet3 intf3 security15 nameif ethernet4 intf4 security20 nameif ethernet5 intf5 security25

enable password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQnbNIdI.2KYOU encrypted

hostname pix(P)l fixup protocol ftp 21 fixup protocol http 80 fixup protocol smtp 25 fixup protocol h323 1720

fixup protocol sqlnet 1521 fixup protocol sip 5060 names pager lines 24 no logging timestamp no logging standby no logging console no logging monitor no logging buffered no logging trap logging facility 20 logging queue 512

interface ethernet0 100full interface ethernet1 100full interface ethernet2 100full

interface ethernet3 auto shutdown interface ethernet4 auto shutdown interface ethernet5 auto shutdown mtu outside 1500 mtu inside 1500 mtu dmz 1500 mtu intf3 1500 mtu intf4 1500 mtu intf5 1500 ip address outside 192.168.P.2 255.255.255.0 ip address inside 10.0.P.1 255.255.255.0 ip address dmz 172.16.P.1 255.255.255.0 ip address intf3 127.0.0.1 255.255.255.255 ip address intf4 127.0.0.1 255.255.255.255 ip address intf5 127.0.0.1 255.255.255.255 ip audit info action alarm

ip audit attack action alarm no failover

failover timeout 0:00:00 failover poll 15

failover ip address outside 0.0.0.0 failover ip address inside 0.0.0.0 failover ip address dmz 0.0.0.0 failover ip address intf3 0.0.0.0 failover ip address intf4 0.0.0.0 failover ip address intf5 0.0.0.0 arp timeout 14400

global (outside) 1 192.168.P.20-192.168.P.254 netmask 255.255.255.0 nat (inside) 1 0.0.0.0 0.0.0.0 0 0

route outside 0.0.0.0 0.0.0.0 192.168.P.1 1

timeout xlate 3:00:00 conn 1:00:00 half-closed 0:10:00 udp 0:02: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

: end [OK]

Bước 9: Kiểm tra hoạt động của global và NAT 1. Mở trình duyệt web

2. Sử dụng trình duyệt web truy cập server tại địa chỉ 172.26.26.50 bằng cách nhập http://172.26.26.50

Bước 10: xem bảng dịch

pixP(config)# show xlate

global 192.168.P.20 Local 10.0.P.3

Một phần của tài liệu Tài liệu Chapter 5 : Cấu hình cơ bản PIX Firewall pdf (Trang 41 - 46)

Tải bản đầy đủ (PDF)

(47 trang)