トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

CISCO PIX FIREWALLについて のバックアップソース(No.1)

*CISCO PIX FIREWALLについて [#ue03a6b4]

PIXのnat、pat、アクセスリストの設定方法が記述されてます。

-[[PIX での nat、global、static、conduit、およびaccess-list コマンドとポート リダイレクションの使用:http://www.cisco.com/japanese/warp/public/3/jp/service/tac/707/28-j.html]] 

なお、何かの原因でリンク切れしてたら、ページの一番下の添付ファイルよりファイルをDLして中身を見てみてください!リンクと同様のファイル(IEのmhtファイル)があります。

***注意!!! [#bdd4d87e]
''alias''、''conduit''、''global''、''nat''、''route''、''static''コマンドの追加、変更又は削除を行った場合は、以下のコマンドを''必ず''実行すること。

 clear xlate

これをやらないと、上述のコマンドで設定変更を行っても、実際の通信には反映されず、不通となる。

詳細は、マニュアルの''コマンドリファレンス 6-199''を参照のこと

***設定内容の表示 [#of22f176]
CISCOの一般的なコマンドとは、ちょっと違います。対応は以下の通り
-ランニングコンフィグの表示(show run) : ''write temirnal''
-スタートアップコンフィグの表示(show start): ''show conf''(省略形)

ちなみに、ランニングコンフィグを保存するには、「''write memory''」コマンドを使います。


***tftpでコンフィグをバックアップ(enableモード) [#fcac8e12]
まず、以下のコマンドでtftpサーバを指定

 tftp-server [if-name] [IP-address] [ファイル名]

次に、write netコマンドでバックアップ実行

 write net [IP-address]:

なお、上記コマンドで指定するIPアドレスは、一つ上で設定したIPアドレスです。

以下、実行例

 pixfirewall(config)# tftp-server inside 192.168.1.10 pixfirewall.txt
 pixfirewall(config)# write net 192.168.1.10:
 Building configuration...
 TFTP write 'pixfirewall.txt' at 192.168.1.10 on interface 1
 [OK]
 pixfirewall(config)#

***設定の初期化(enableモード) [#f99d1f58]
以下のコマンドで実行します。

 pixfirewall# write erase
 Erase PIX configuration in flash memory? [confirm]

すると、確認されるので、「y」を押すと、フラッシュメモリに保存されている設定が全部消えます。
&br;
ちなみに、初期化後のデフォルトコンフィグは以下のようになってます。

 pixfirewall> en
 Password:
 pixfirewall# write terminal
 Building configuration...
 : Saved
 :
 PIX Version 5.2(9)
 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 rtsp 554
 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
 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
 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]



***パスワード設定(enableモード) [#q784c940]

 pixfirewall# passwd kakitsubata     //一般ユーザパスワードを「kakitsubata」に設定
 pixfirewall#
 pixfirewall# enable password kakitsubata  //一般ユーザパスワードを「kakitsubata」に設定

 

***インターフェースの設定 [#g2b9811d]
 pixfirewall# conf t
 pixfirewall(config)# interface eth0 auto
 pixfirewall(config)# interface eth1 auto
 pixfirewall(config)#
 pixfirewall(config)# ip address outside 192.168.3.243 255.255.255.0
 pixfirewall(config)# ip address inside 192.168.2.1 255.255.255.0


***ルーティングの設定 [#bd6c3637]
内側の通信について、直接接続のネットワーク以外のデフォルトルータを192.168.2.1に設定

 pixfirewall(config)# route inside 0.0.0.0 0.0.0.0 192.168.2.2 1

***NATの設定 [#b1fd462d]
FWの内側から外側で、PAT(ポートアドレス変換)を使って、内側からのすべての通信のIPアドレスを192.168.3.244に変換する設定

 pixfirewall(config)# global (outside) 1 192.168.3.244
 pixfirewall(config)# nat (inside) 1 0.0.0.0 0.0.0.0 0 0


***アクセスリストの設定 [#x93773f1]

 access-list inside_acl permit tcp any 192.168.3.0 255.255.255.0 eq www 
 access-list inside_acl permit tcp any 192.168.3.0 255.255.255.0 eq 8080 
 access-list inside_acl permit icmp any 192.168.3.0 255.255.255.0 
 access-list outside_acl permit icmp any any 
 access-group outside_acl in interface outside
 access-group inside_acl in interface inside

***telnet許可の設定 [#fa742385]
FW内側のネットワーク0.0.0.0/0からのtelnetを許可する。

 telnet 0.0.0.0 0.0.0.0 inside

***設定後のコンフィグ [#wcb1612f]

 : Saved
 :
 PIX Version 5.2(9)
 nameif ethernet0 outside security0
 nameif ethernet1 inside security100
 enable password 7.bBKwb7icGVi.LL encrypted
 passwd 7.bBKwb7icGVi.LL encrypted
 hostname pixfirewall
 fixup protocol ftp 21
 fixup protocol http 80
 fixup protocol h323 1720
 fixup protocol rsh 514
 fixup protocol rtsp 554
 fixup protocol smtp 25
 fixup protocol sqlnet 1521
 fixup protocol sip 5060
 names
 access-list outside_acl permit icmp any any 
 access-list inside_acl permit tcp any 192.168.3.0 255.255.255.0 eq www 
 access-list inside_acl permit tcp any 192.168.3.0 255.255.255.0 eq 8080 
 access-list inside_acl permit icmp any 192.168.3.0 255.255.255.0 
 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
 interface ethernet1 auto
 mtu outside 1500
 mtu inside 1500
 ip address outside 192.168.3.243 255.255.255.0
 ip address inside 192.168.2.1 255.255.255.0
 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
 arp timeout 14400
 global (outside) 1 192.168.3.244
 nat (inside) 1 0.0.0.0 0.0.0.0 0 0
 access-group outside_acl in interface outside
 access-group inside_acl in interface inside
 route inside 0.0.0.0 0.0.0.0 192.168.2.2 1
 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 sip 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
 tftp-server inside 192.168.1.10 pixfirewall.txt
 floodguard enable
 no sysopt route dnat
 isakmp identity hostname
 telnet 0.0.0.0 0.0.0.0 inside
 telnet timeout 5
 ssh timeout 5
 terminal width 80
 Cryptochecksum:2c0ebd01a8a4c520887ce65a75888f89
 : end