顯示具有 Switch 標籤的文章。 顯示所有文章
顯示具有 Switch 標籤的文章。 顯示所有文章

2015年9月30日 星期三

[Switch] Juniper EX4200 防火牆設定(ACL)

    在Cisco Switch裡要執行Access Control,是功能稱坐ACL,而 Juniper 則稱之 Firewall Filter,以下則統一稱之ACL。而一般Switch要讓ACL可以正確執行,大致上都分成以下兩步驟即可完成設定。其中,Juniper的每組ACL被命名為filter,而每個filter又可設定多組term,term的目的是指定期望的match(from)和actions(then)。

  1. 編輯ACL Rules
    #edit firewall
    #set family ethernet-switching filter acl1 term drop from source-address 192.168.2.50
    #set family ethernet-switching filter acl1 term drop then discard
    #set family ethernet-switching filter acl1 term default then accept
    #exit

    Note : 粗體部分可自行定義

  2. 綁定Interface Port 或 VLAN
    • One Interface Port
    #edit interfaces
    #set ge-0/0/8 unit 0 family ethernet-switching filter input acl1
    #commit
    • Multi Interface Port
    或一次綁定多組Port
    #set interfaces interface-range test member-range ge-0/0/0 to ge-0/0/48
    #edit interfaces
    #set interface-range test unit 0 family ethernet-switching filter input acl1
    #commit
    • VLAN
    #edit vlans
    #set default filter input acl1
    #commit

Reference :
[1] Juniper Firewall Configuration for EX Series

2015年9月19日 星期六

[Switch] Juniper EX4200 基本設定

  • 進入Configure Mode
    (初次使用Juniper Switch,預設帳號root,密碼則為空)
    root%cli
    root>configure
    root#

  • 設定 Management Port
    root#set interface me0 unit 0 family inet address <ip-address>/<mask>

  • 儲存設定
    #commit // 儲存設定
    #commit check // 儲存設定前,檢查語法是否正確
    #commit at time // 指定時間執行儲存

  • 設定帳號相關
    #set system root-authentication plain-text-password //設定root密碼

    #set system login user class super-user // 建立帳號
    #set system login user authenication plain-text-password // 設定密碼

  • 關閉Management Port Alarm(Management Port若未接,前面則會顯示紅燈)
    #set chassis alarm management-ethernet link-down ingore

  • 啟動Service
    #set system services telnet // 啟動telnet (root無法登入)
    #set system services ssh // 啟動ssh
    #set system service web-management http //啟動Http
    #commit

  • 重開機
    >request system reboot

  • 關機
    >request system power-off

  • 回復出廠值
    #load factory-default
Reference:
[1] Juniper Official Site
[2] Juiper EX2200 基礎設定