HCIE学习之路11:一个防火墙网络实验

今天以华为USG系列防火墙为例,写一个在企业出口配置防火墙的网络实验。

防火墙作为VAS设备,向租户提供安全策略、EIP、源NAT、IPSec、内容安全等增值安全服务。作为执行器,接收控制器下发的防御策略,及时阻断威胁流量。

应用领域包括:校园出口、广电网络、金融中心、企业园区、云计算等。

以企业园区为例:防火墙部署在大中型企业出口提供Internet接入、VPN互联和安全防护功能,主要使用双机热备、NAT、ISP智能选路、VPN、攻击防范等功能。

下面列举2个应用场景配置:CLI和Web

管理员登录设备后,首先要对设备进行网络基础配置,使设备快速接入网络,如下图,企业购买了FW作为企业出口网关。管理员在登录FW后,首先需要对FW进行网络基础配置,包括设备名称、时钟、接口IP地址、安全区域、缺省路由及缺省包过滤的配置。

CLI配置思路

  1. 配置FW的设备名称。
  2. 配置FW的时钟。
  3. 配置FW各业务接口的IP地址。IP地址需要在配置前进行统一规划。
  4. 将各个业务接口加入安全区域。一般情况下,连接外网的接口加入安全级别低的安全区域(例如untrust区域),连接内网的接口加入安全级别高的安全区域(例如trust区域),服务器可以加入DMZ区域。
  5. 配置缺省路由,下一跳为ISP提供的接入点。
  6. 打开缺省包过滤,保证FW能够接入Internet。缺省情况下,缺省包过滤关闭。

CIL操作步骤

1.配置设备名称

<FW> system-view
[FW] sysname FW_A
[FW_A] quit

2.配置时钟,包括当前时间和时区。

<FW> clock datetime 18:10:45 2023-08-14
<FW> clock timezone BJ add 08:00:00

3.配置接口的IP地址。连接外网的接口IP地址(本例为10.1.1.1/24)需要从当地ISP获取。

<FW_A> system-view
[FW_A] interface GigabitEthernet 0/0/0
[FW_A-GigabitEthernet0/0/0] ip address 192.168.1.1 24
[FW_A-GigabitEthernet0/0/0] quit
[FW_A] interface GigabitEthernet 0/0/1
[FW_A-GigabitEthernet0/0/1] ip address 10.1.1.1 24
[FW_A-GigabitEthernet0/0/1] quit
[FW_A] interface GigabitEthernet 0/0/2
[FW_A-GigabitEthernet0/0/2] ip address 1.1.1.1 24
[FW_A-GigabitEthernet0/0/2] quit

4.将各个业务接口加入安全区域。

[FW_A] firewall zone trust
[FW_A-zone-trust] add interface GigabitEthernet 0/0/0
[FW_A-zone-trust] quit
[FW_A] firewall zone dmz
[FW_A-zone-dmz] add interface GigabitEthernet 0/0/1
[FW_A-zone-dmz] quit
[FW_A] firewall zone untrust
[FW_A-zone-untrust] add interface GigabitEthernet 0/0/2
[FW_A-zone-untrust] quit

5.配置缺省路由。

[FW_A] ip route-static 0.0.0.0 0.0.0.0 1.1.1.254

6.打开缺省包过滤,保证FW能够接入Internet。

这里同样可以用脚本直接导入的方式实现一键配置,以下是完整的配置脚本:

#
 sysname FW_A
#                                                                               
interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.0
#                                                                               
interface GigabitEthernet0/0/1
 ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 1.1.1.1 255.255.255.0
#
firewall zone trust
 set priority 85
 add interface GigabitEthernet0/0/0
#
firewall zone dmz
 set priority 50
 add interface GigabitEthernet0/0/1
#
firewall zone untrust
 set priority 5
 add interface GigabitEthernet0/0/2
#
ip route-static 0.0.0.0 0.0.0.0 1.1.1.254
#                                                                               
security-policy                                                                 
 default action permit      
#
return

Web配置思路

  1. 配置FW的时钟。
  2. 配置FW各业务接口的IP地址。IP地址需要在配置前进行统一规划。
  3. 将各个业务接口加入安全区域。一般情况下,连接外网的接口加入安全级别低的安全区域(例如untrust区域),连接内网的接口加入安全级别高的安全区域(例如trust区域),服务器可以加入DMZ区域。
  4. 配置缺省路由,下一跳为ISP提供的接入点。
  5. 打开缺省包过滤,保证FW能够接入Internet。缺省情况下,缺省包过滤关闭。

Web操作步骤

  1. 配置时钟,包括当前时间和时区。
    1. 选择“系统 > 配置 > 时钟配置”。
    2. 在“配置方式”中选择“手动配置时间”。
    3. 配置“时区”。
    4. 配置“日期”。
    5. 配置“系统时间”。
    6. 单击“应用”。
  2. 配置接口0的IP地址和安全区域。
    1. 选择“网络 > 接口”。
    2. 单击GE0/0/0。
    3. 按如下参数配置接口GE0/0/0。安全区域trust的IP地址192.168.1.1/24
    4. 单击“确定”。
    5. 重复上述步骤按如下参数配置接口GE0/0/1。安全区域dmz的IP地址10.1.1.1/24
    6. 重复上述步骤按如下参数配置接口GE0/0/2。安全区域untrust的IP地址1.1.1.1/24
  3. 配置缺省路由。
    1. 选择“网络 > 路由 > 静态路由”。
    2. 单击“新建”。
    3. 按如下参数配置缺省路由。目的地址0.0.0.0掩码0.0.0.0下一跳1.1.1.254
    4. 单击“确定”。
  4. 打开缺省包过滤,保证FW能够接入Internet。一般情况下建议保持缺省包过滤关闭,然后配置具体允许哪些数据流通过的安全策略。
    1. 选择“策略 > 安全策略”。
    2. 修改default安全策略的动作为允许。
    3. 单击“确定”。

以上就是企业出口防火墙典型案例的详细配置,感兴趣的同学可以在ensp搭建拓扑图试一下。

这篇文章有 642 个评论

  1. 888starz_hsen

    The apk file can be downloaded directly onto Android devices in a few simple steps.

    After downloading the file, simply tap it and wait for the installation to complete automatically.

    The Android version is compatible with most phones, including lower-spec models.

    Downloading the apk from the official site is best to avoid untrusted files.

    iPhone users can install the 888starz app via the App Store on iOS.

    888starz [url=http://www.complice-st.com/]888starz apk[/url]

  2. true_kiMt

    The casino welcomes players from the United Kingdom with a localised experience and responsive support.

    Progressive jackpots and top-rated new releases are highlighted in the casino lobby.

    The VIP scheme gives loyal users cashback boosts, gifts and a personal manager.

    Adding funds takes just a moment and play begins straight away.

    Fair play is guaranteed by independently tested RNG games with published RTP rates.

    Help is always at hand thanks to round-the-clock live chat support.

    true fortune casino free chip [url=https://www.true-fortune-casino11.com/free-chips]true fortune casino free chip[/url]

  3. true_nhEr

    True Fortune casino is one of the most popular online casinos among players in the United Kingdom.

    The True Fortune casino features thousands of slots from leading providers like Pragmatic Play, NetEnt and Play’n GO.

    A welcome offer with matched bonus funds and free spins awaits new players in the United Kingdom.

    Players can fund their account via cards, digital wallets and modern payment services.

    True Fortune promotes responsible gaming with limits, time-outs and support links.

    Help is always at hand thanks to round-the-clock live chat support.

    true fortune no deposit bonus 2026 [url=http://true-fortune-casino16.com/no-deposit-bonus/]true fortune no deposit bonus 2026[/url]

  4. true_wemr

    The official True Fortune casino has built a strong reputation with players across the United Kingdom.
    A dedicated live casino streams real-dealer roulette, blackjack and baccarat around the clock.
    The promotions page lists reload bonuses, tournaments and cashback offers.
    true fortune casino bonus code [url=https://www.true-fortune-casino15.com/bonus]true fortune casino bonus code[/url]
    Withdrawals are handled quickly, with e-wallet payouts often completed the same day.
    True Fortune promotes responsible gaming with limits, time-outs and support links.
    Help is always at hand thanks to round-the-clock live chat support.

  5. 第 Kenneththada页

    Нужны скины? lisskins 2 купить скины CS2 по выгодным ценам — большой выбор популярных предметов для Counter-Strike 2. Найдите редкие ножи, перчатки, оружие и другие скины для игры. Быстрая покупка, удобный каталог и актуальные цены на скины CS2.

  6. true_chor

    The official True Fortune website brings hundreds of games together on a single, easy-to-use platform.
    Big-money jackpots and trending games are easy to find on the homepage.
    Players enjoy recurring promotions including cashback and free spins on selected slots.
    Deposits and withdrawals can be made with cards, e-wallets and bank transfer.
    promo code true fortune casino [url=true-fortune-casino25.com/promocode]promo code true fortune casino[/url]
    A valid licence and secure infrastructure make True Fortune a safe place to play.
    Transparent terms and a helpful FAQ section cover deposits, bonuses and withdrawals.

  7. 888starz_wpOl

    The platform features a simple design that helps users in Uzbekistan navigate with ease.

    The 888starz casino features more than 5000 games from top providers like Pragmatic Play, NetEnt and Microgaming.

    Players can bet on major competitions from the English league to the top tournaments in Uzbekistan.

    888starz highlights the latest bonuses and promotions available to players in Uzbekistan.

    The official 888starz site supports multiple payment methods including bank cards and e-wallets like Skrill and Neteller.

    888starz apk [url=https://goldfein.cz/]888starz apk[/url]

发表回复