Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

16.2. interface

firewall-> get interface all
box is not in pure_l2_mode

A - Active, I - Inactive, U - Up, D - Down, R - Ready

Total interface: 12
Name           IP Address         Zone        MAC            VLAN State VSD
trust     Trust       001f.1255.a902    -   U   -
untrust   Untrust     001f.1255.a901    -   U   -
serial          Null        001f.1255.a906    -   D   -
tun.1          unnumbered         Untrust     untrust           -   D   -
vlan1          VLAN        001f.1255.a90f    1   D   -
null           Null        N/A               -   U   0

16.2.1. PPPoE

set pppoe name "PPPoE"
set pppoe name "PPPoE" username "cjf0000@163.gd" password "yVizHVPmNgsYRvCpTP7RsQnxg2VpbQ=="
set pppoe name "PPPoE" idle 0
set pppoe name "PPPoE" interface untrust
set pppoe name "PPPoE" auto-connect 30

16.2.2. 介面模式

set interface eth4 nat    //將介面4設置為nat模式
set interface eth4 route  //將介面4設置為路由模式

Route between multiple subnets without a router

set interface trust ip (ip address) (subnet mask) secondary [Enter]
save [Enter]

16.2.3. vlan

set zone name office //建立一個3層的zone,名為Office
set zone name L2-office  L2 1   //建立一個2層的zone,名為L2-Office(二層介面必須以L2-開始命名),vlan id 為1。
set interface eth4 zone office   //將介面4設置為office  zone的介面。
set interface vlan1 ip  //將vlan1的ip設置為10.10.10.10
set interface vlan1 manage web  //開通vlan1介面的web管理功能
set interface vlan1 manage ping  //開通vlan1介面的ping功能

16.2.4. MIP

set interface eth3 mip host vrouter trust-vr   //設置mip,外網ip1.1.1.1 綁定到內網ip上
unset interface eth3 mip   //取消1.1.1.1的mip設置
unset interface "untrust" mip
set interface "untrust" mip host netmask vr "trust-vr"

set policy from "Untrust" to "Trust"  "Any" "MIP(" "HTTP" permit log

policy id = 79

set policy id 79
set service "HTTPS"

16.2.5. VIP

set interface eth3 vip untrust-ip + 21 ftp       //設置vip
set interface eth3 vip untrust-ip + 8000 ftp
set service "OpenSSH" protocol tcp src-port 0-65535 dst-port 22-22

set interface untrust vip + 22 OpenSSH

set policy from untrust to trust any vip( OpenSSH permit