#contents *初期設定 [#y980e24c] -起動してみる。動作するなら問題なし。 -可能であれば、余裕があればTFTP経由で設定ファイルを保存しておく。 -特に必要なければルータの設定に入る。 -起動中にteratermのメニューバー「コントロールパネル」から「ブレーク送信」を実行 --rommon 1 > confreg 0x2142 --rommon 2 > reset //再起動する --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]: y At any point you may enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Basic management setup configures only enough connectivity for management of the system, extended setup will ask you to configure each interface on the system Would you like to enter basic management setup? [yes/no]: y Configuring global parameters: Enter host name [Router]: *パスワード設定 [#z6e3834e] -コンソールパスワード --(config)#line console 0 --(config-line)#login //パスワード要求設定 --(config-line)#password cisco //ciscoがパスワードになる -vty(telnet)パスワード --(config)#line vty 0 4 --(config-line)#login //パスワード要求設定 --(config-line)#password cisco //ciscoがパスワードになる -特権モードへのパスワード --(config)#enable password cisco //ciscoがクリアテキストでパスワードになる --(config)#enable secret cisco //ciscoが暗号化されてパスワードになる *NTP(時刻)設定 [#oea1fabb] -設定 --#configure terminal --(config)#clock timezone jst +9 //タイムゾーンの設定 ---#clock set 22:48:00 Jul 13 2012 //手動設定 --(config)#ntp server 10.0.0.1 //サーバ同期設定 -確認 --#show clock detail *Windows側設定 [#eccf3fc5] -コマンドプロンプト --route print --route -p add 10.1.1.0 mask 255.255.255.0 192.168.136.150 ---route delete 10.1.1.0 [255.255.255.0 //省略可能] -Windowsファイアーウォールが邪魔する場合は無効化もしくは以下の設定 --ファイアウォールの設定 -> 詳細設定タブ -> ICMP設定ボタン -> エコー要求の着信を許可するチェックボックスにチェック *Linux側設定 [#h6261e56] -route add -net 10.1.1.0 gw 192.168.136.150 metric 1 netmask 255.255.255.0 eth0 -上記設定は一時的にしか有効にならないようなので起動時に利用する場合は下記を設定する。 -/etc/sysconfig/network-scripts/route-eth0 --10.1.1.0/24 via 192.168.136.150 //10.1.1.0/24宛のパケットを192.168.136.150へ転送する。 *NATの設定 [#ye8ca765] -(config)#access-list 1 permit 10.1.1.0 0.0.0.255 -(config)#ip nat inside source list 1 interface FastEthernet 0 overload -(config)#interface FastEthernet 0 -(config-if)#ip nat outside -(config)#interface vlan 1 -(config)#ip nat inside -(config)#ip route 0.0.0.0 0.0.0.0 192.168.136.254 **NATの設定その他 [#y9d7829d] ***スタティックNAT、静的NAT [#w5e9edc6] -(config)#ip nat inside source static 10.1.1.1 192.168.136.150 -(config)#interface vlan 1 -(config-if)#ip nat inside -(config)#interface FastEthernet0 -(config-if)#ip nat outside -(config)#ip route 192.168.136.0 255.255.255.0 ***ダイナミックNAT、動的NAT [#n6cde2fc] -(config)#ip nat pool DNAT 200.1.1.1 200.1.1.10 netmask 255.255.255.0 -(config)#access-list 1 permit 172.16.1.0 0.0.0.255 -(config)#ip nat inside sourde list 1 pool DNAT -(config)#interface vlan 1 -(config-if)#ip nat inside -(config)#interface FastEthernet 0 -(config-if)#ip nat outside -(config)# ip route 192.168.136.0 255.2552555 ***PATオーバーローディング、IPマスカレード [#q1c56bf8] [[#ye8ca765]] *DNSの設定 [#v65beeb2] -(config)#ip dns view defaultが通らないので別の方法で。 -(config)#ip domain-lookup -(config)#ip name-server 192.168.136.200 *DHCP設定 [#xe7d82e1] -(config)#ip dhcp excluded-address 10.1.1.200 10.1.1.254 //割り振らないアドレス。複数指定or一個指定 -(config)#ip dhcp pool sales //salesはプール名 -(dhcp-config)#network 10.1.1.0 255.255.255.0 -(dhcp-config)#default-router 10.1.1.254 -(dhcp-config)#dns-server 10.1.1.254 *NetBIOS設定 [#bef3d299] -(dhcp-config)#netbios-name-server 10.1.1.254 -(dhcp-config)#netbios-node-type type type... b-node broadcast h-node hybrid m-node mixed p-node pear-to-pear -http://www.infraexpert.com/study/dhcp1.htm *アクセスリスト設定 [#ua0e3413] **初期状態+α [#z0bda01f] -#sh access-lists Standard IP access list 1 10 permit 10.1.1.0, wildcard bits 0.0.0.255 (763 matches) Extended IP access list sl_def_acl 10 deny tcp any any eq telnet log 20 deny tcp any any eq www log 30 deny tcp any any eq 22 log 40 permit ip any any log **試行錯誤後 [#k27034fb] -(config)#access-list 100 permit icmp any any echo -(config)#access-list 100 permit tcp any any eq www -(config)#access-list 100 permit tcp any any eq domain -(config)#access-list 100 permit udp any any eq domain -(config)#access-list 100 permit tcp any any eq 22 -(config)#access-list 100 permit tcp any any eq ftp -(config)#access-list 100 permit tcp any any eq ftp-data -(config)#interface FastEthernet 0 //VLAN側では上手くいかない -(config-if)#ip access-group 100 out -Router#sh ip access-lists Standard IP access list 1 10 permit 10.1.1.0, wildcard bits 0.0.0.255 (3 matches) Extended IP access list 100 10 permit icmp any any echo (4 matches) 20 permit tcp any any eq www 30 permit tcp any any eq domain 40 permit udp any any eq domain 50 permit tcp any any eq 22 60 permit tcp any any eq ftp (22 matches) 70 permit tcp any any eq ftp-data (6 matches) Extended IP access list sl_def_acl 10 deny tcp any any eq telnet log 20 deny tcp any any eq www log 30 deny tcp any any eq 22 log 40 permit ip any any log http://kumo.chicappa.jp/?page_id=39 -show ip route -ip route 0.0.0.0 0.0.0.0 192.168.136.254 [[:お仕事メモ]] // IP:"219.212.46.58" TIME:"2014-03-17(<abbr class="week_day" title="月曜日">月</abbr>)23:15:43" REFERER:"http://157.7.130.26/" USER_AGENT:"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36