国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

加裝防火墻前后的路由器配置

2019-11-05 00:29:05
字體:
來源:轉載
供稿:網友

  隨著人們對網絡知識的普及,企業或公司的網絡安全性,就變得更加重要起來了。關于網絡安全的最可靠方法是加裝防火墻。
  在這里我講述一下關于加裝防火墻前后的路由配置變化,因為在原先沒有防火墻的情況下,路由既起到路由選擇的作用,又起到網關的作用。當加裝防火墻的后,局域網的網關就設為防火墻的局域網ip地址。要修改路由首先還是先看該網絡的拓撲結構。在這里我所描述的是這樣拓撲結構:
  
 

  
圖1

  
  一、先將進入路由器設置將原來的配置備份一份,雖然這一份備份以后不一定用的上,可是萬一防火墻安裝失敗呢?
  
 

  
圖2

  
  下面為沒有安裝防火墻以前的路由器配置情況。
  User access Verification
  
  PassWord: (鍵入TELNET密碼,假如你是直接用CONSOLE口進入沒有此項提示)
  
  Router>en
  
  Password:
  
  Router#show config (察看ROUTER配置情況命令)
  
  Using 810 out of 7506 bytes
  
  !
  
  version 12.1
  
  service timestamps debug uptime
  
  service timestamps log uptime
  
  no service password-encryption
  
  !
  
  hostname Router (ROUTER名字,這里為默認名字ROUTER)
  
  !
  
  enable secret 5 $1$FreK$4oQGtvDEF1jv8dh3NNXnN0.
  
  enable password 123456789 (特權密碼,當然這是加密的)
  
  !
  
  ip subnet-zero
  
  !
  
  interface Ethernet0 (配置局域網e0口)
  
  ip address 192.168.1.1 255.255.255.0 (e0口在其局域網中對應的ip為192.168.1.1
  
  ip nat inside 255.255.255.0是表示為C類網絡)
  
  !
  
  interface Ethernet1 (E1口沒有激活,也沒有配置)
  
  no ip address
  
  shutdown
  
  !
  
  interface Serial0
  
  bandwidth 2048
  
  ip address 211.97.213.41 255.255.255.252 (此為定義ROUTER外部接口的IP
  
  ip nat outside 255.255.255.252表示此合法的INTERNET-IP)
  
  encapsulation ppp
  
  !
  
  ip nat pool 165 211.97.213.41 211.97.213.46 netmask 255.255.255.248 (isp給你分配的ip)
  
  ip nat inside source list 1 pool 165 overload
  
  ip classless
  
  ip route 0.0.0.0 0.0.0.0 Serial0
  
  no ip http server
  
  !
  
  access-list 1 permit 192.168.1.0 0.0.0.255
  
  !
  
  line con 0
  
  transport input none
  
  line vty 0 1
  
  password 123456
  
  login
  
  !
  
  end
  
  Router#
  
  
  二、按照圖1裝上防火墻。
  將從路由器到交換機上的線,改為先從路由器到防火墻,然后用防火墻的E0口接交換機。
  

  
圖3

  
  進入路由器配置模式修改,將路由器的配置改為:
  Using 942 out of 7506 bytes
  
  !
  
  version 12.1
  
  service timestamps debug uptime
  
  service timestamps log uptime
  
  service password-encryption
  
  !
  
  hostname router
  
  !enable secret 5 $1$FreK$4oQGtvDEF1jv8dh3NNXnN0
  
  enable password 123455676!
  
  !
  
  ip subnet-zero
  
  !
  
  crypto ipsec transform-set test esp-des esp-md5-hmac
  
  !
  
  crypto map vpnmap 1 ipsec-isakmp
  
  ! Incomplete
  
  set transform-set test
  
  match address 100
  
  interface Ethernet0
  
  ip address 211.97.213.41 255.255.255.248
  
  interface Ethernet1
  
  no ip address
  
  ip nat inside
  
  no ip route-cache
  
  no ip mroute-cache
  
  shutdown
  
  !
  
  !
  
  interface Serial0
  
  description internet
  
  bandwidth 2048
  
  ip address 211.97.209.145 255.255.255.252
  
  ip nat outside
  
  encapsulation ppp
  
  no ip route-cache
  
  no ip mroute-cache
  
  !
  
  ip classless
  
  ip route 0.0.0.0 0.0.0.0 Serial0
  
  ip http server
  
  !
  
  route-map nonat permit 10
  
  match ip address 110
  
  !
  
  !
  
  line con 0
  
  transport input none
  
  line vty 0 4
  
  password 123456
  
  login
  
  !
  
  end
  
  三、這時候,你可以配置你的防火墻了,以下是防火墻的配置情況:
  PIX Version 5.1(2)
  
  nameif ethernet0 outside security0
  
  nameif ethernet1 inside security100
  
  nameif ethernet2 pix/intf2 security10
  
  hostname imrac_c_pix
  
  fixup PRotocol FTP 21
  
  fixup protocol http 80
  
  fixup protocol h323 1720
  
  fixup protocol rsh 514
  
  fixup protocol smtp 25
  
  fixup protocol sqlnet 1521
  
  no names
  
  access-list 100 permit ip 192.168.1.1 255.255.255.0 192.168.0.0 255.255.255.0
  
  access-list 100 permit ip 192.168.1.1 255.255.255.0 192.100.0.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
  
  logging facility 20
  
  logging queue 512
  
  interface ethernet0 auto
  
  interface ethernet1 auto
  
  interface ethernet2 auto shutdown
  
  mtu outside 1500
  
  mtu inside 1500
  
  mtu pix/intf2 1500
  
  ip address outside 211.97.213.44 255.255.255.248
  
  ip address inside 192.168.1.1 255.255.255.0
  
  ip address pix/intf2 127.0.0.1 255.255.255.255
  
  no failover
  
  failover timeout 0:00:00
  
  failover ip address outside 0.0.0.0
  
  failover ip address inside 0.0.0.0
  
  failover ip address pix/intf2 0.0.0.0
  
  arp timeout 14400
  
  global (outside) 1 211.97.213.45 netmask 255.255.255.248
  
  nat (inside) 0 access-list 100
  
  nat (inside) 1 0.0.0.0 0.0.0.0 0 0
  
  route outside 0.0.0.0 0.0.0.0 211.97.213.41 1
  
  timeout xlate 3:00:00 conn 1:00:00 half-closed 0:10:00 udp 0:02:00
  
  timeout rpc 0:10:00 h323 0:05:00
  
  aaa-server RADIUS protocol radius
  
  no snmp-server location
  
  no snmp-server contact
  
  snmp-server community public
  
  no snmp-server enable traps
  
  floodguard enable
  
  sysopt connection permit-ipsec
  
  crypto ipsec transform-set trans esp-des esp-md5-hmac
  
  crypto map vpnmap 40 ipsec-isakmp
  
  crypto map vpnmap 40 match address 100
  
  crypto map vpnmap 40 set transform-set trans
  
  crypto map vpnmap interface outside
  
  isakmp enable outside
  
  isakmp identity address
  
  isakmp policy 1 authentication pre-share
  
  isakmp policy 1 encryption des
  
  isakmp policy 1 hash md5
  
  isakmp policy 1 group 1
  
  isakmp policy 1 lifetime 86400
  
  telnet 192.168.1.88 255.255.255.255 inside
  
  telnet timeout 5
  
  terminal width 80
  
  Cryptochecksum:7fd10854228b7e32b2808508f49a65a7


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 靖西县| 融水| 钟山县| 广灵县| 乌鲁木齐市| 靖边县| 柯坪县| 德兴市| 株洲县| 三亚市| 洛扎县| 鹤山市| 丰都县| 柳江县| 马关县| 美姑县| 宝应县| 老河口市| 盱眙县| 红原县| 高清| 萍乡市| 内乡县| 于田县| 贵定县| 长白| 舒兰市| 海阳市| 武平县| 霍林郭勒市| 福安市| 松潘县| 南川市| 石棉县| 秭归县| 大宁县| 巫溪县| 彭州市| 体育| 民县| 南汇区|