我无法让安装了最新 6.3.0r05 固件的全新 Juniper SSG-5 从我在设置为 vlan2 的 bgroup0 上创建的子接口(bgroup0.1 在“wifi”区域)路由到互联网。当连接到默认 vlan 时,它可以正常连接到互联网。
当我切换到 vlan2 时,我无法访问互联网。我可以从 dhcp 获取正确的 ip 地址 (10.150.0.0/24),能够访问 Juniper 管理页面等,但无法通过防火墙,无法 ping 4.2.2.2 或互联网网关。即使在 wifi-to-untrust 策略上设置日志记录,它也会显示尝试次数(这是超时)。
172.31.16.0/24 是不受信任的局域网,它已经进行了网络地址转换,但测试时可以正常工作。可以从默认 vlan ping 此 IP,但不能从 vlan2 ping 通 192.168.1.0/24 是受信任的主局域网 10.150.0.0/24 是 vlan2 上的 wifi 隔离局域网
这个想法是设置一个具有局域网和访客访问的 AP(AP 支持不同 VLAN 上的多个 ssid)。我知道我可以设置 Juniper 以使用不同的端口作为 wifi 局域网,并使用其 Procurve 交换机进行 VLAN 分离,但我从未在 Juniper 防火墙上使用过 VLAN,我想尝试这种方式。
这是完整的配置文件:
unset key protection enable
set clock timezone -5
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set alg appleichat enable
unset alg appleichat re-assembly enable
set alg sctp enable
set auth-server "Local" id 0
set auth-server "Local" server-name "Local"
set auth default auth server "Local"
set auth radius accounting port 1646
set admin name "netscreen"
set admin password "xxxxxxxxxxxxxxxx"
set admin auth web timeout 10
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin format dos
set zone "Trust" vrouter "trust-vr"
set zone "Untrust" vrouter "trust-vr"
set zone "DMZ" vrouter "trust-vr"
set zone "VLAN" vrouter "trust-vr"
set zone id 100 "Wifi"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst
set zone "Untrust" block
unset zone "Untrust" tcp-rst
set zone "MGT" block
unset zone "V1-Trust" tcp-rst
unset zone "V1-Untrust" tcp-rst
set zone "DMZ" tcp-rst
unset zone "V1-DMZ" tcp-rst
unset zone "VLAN" tcp-rst
unset zone "Wifi" tcp-rst
set zone "Untrust" screen tear-drop
set zone "Untrust" screen syn-flood
set zone "Untrust" screen ping-death
set zone "Untrust" screen ip-filter-src
set zone "Untrust" screen land
set zone "V1-Untrust" screen tear-drop
set zone "V1-Untrust" screen syn-flood
set zone "V1-Untrust" screen ping-death
set zone "V1-Untrust" screen ip-filter-src
set zone "V1-Untrust" screen land
set interface "ethernet0/0" zone "Untrust"
set interface "ethernet0/1" zone "Untrust"
set interface "bgroup0" zone "Trust"
set interface "bgroup0.1" tag 2 zone "Wifi"
set interface "bgroup1" zone "DMZ"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
set interface bgroup0 port ethernet0/5
set interface bgroup0 port ethernet0/6
unset interface vlan1 ip
set interface ethernet0/0 ip 172.31.16.243/24
set interface ethernet0/0 route
set interface bgroup0 ip 192.168.1.1/24
set interface bgroup0 nat
set interface bgroup0.1 ip 10.150.0.1/24
set interface bgroup0.1 nat
set interface bgroup0.1 mtu 1500
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
set interface bgroup0 ip manageable
set interface bgroup0.1 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/1 manage ping
set interface bgroup0.1 manage ping
set interface bgroup0.1 manage telnet
set interface bgroup0.1 manage web
unset interface bgroup1 manage ping
set interface bgroup0 dhcp server service
set interface bgroup0.1 dhcp server service
set interface bgroup0 dhcp server auto
set interface bgroup0.1 dhcp server enable
set interface bgroup0 dhcp server option gateway 192.168.1.1
set interface bgroup0 dhcp server option netmask 255.255.255.0
set interface bgroup0 dhcp server option dns1 8.8.8.8
set interface bgroup0.1 dhcp server option lease 1440
set interface bgroup0.1 dhcp server option gateway 10.150.0.1
set interface bgroup0.1 dhcp server option netmask 255.255.255.0
set interface bgroup0.1 dhcp server option dns1 8.8.8.8
set interface bgroup0 dhcp server ip 192.168.1.33 to 192.168.1.126
set interface bgroup0.1 dhcp server ip 10.150.0.50 to 10.150.0.100
unset interface bgroup0 dhcp server config next-server-ip
unset interface bgroup0.1 dhcp server config next-server-ip
set interface "serial0/0" modem settings "USR" init "AT&F"
set interface "serial0/0" modem settings "USR" active
set interface "serial0/0" modem speed 115200
set interface "serial0/0" modem retry 3
set interface "serial0/0" modem interval 10
set interface "serial0/0" modem idle-time 10
set flow tcp-mss
unset flow no-tcp-seq-check
set flow tcp-syn-check
unset flow tcp-syn-bit-check
set flow reverse-route clear-text prefer
set flow reverse-route tunnel always
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set crypto-policy
exit
set ike respond-bad-spi 1
set ike ikev2 ike-sa-soft-lifetime 60
unset ike ikeid-enumeration
unset ike dos-protection
unset ipsec access-session enable
set ipsec access-session maximum 5000
set ipsec access-session upper-threshold 0
set ipsec access-session lower-threshold 0
set ipsec access-session dead-p2-sa-timeout 0
unset ipsec access-session log-error
unset ipsec access-session info-exch-connected
unset ipsec access-session use-error-log
set url protocol websense
exit
set policy id 1 from "Trust" to "Untrust" "Any" "Any" "ANY" permit
set policy id 1
exit
set policy id 2 from "Wifi" to "Untrust" "Any" "Any" "ANY" permit log
set policy id 2
exit
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set config lock timeout 5
unset license-key auto-update
set telnet client enable
set snmp port listen 161
set snmp port trap 162
set snmpv3 local-engine id "0162122009006149"
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
set route 0.0.0.0/0 interface ethernet0/0 gateway 172.31.16.1
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
答案1
解决了问题。我必须在 Wifi-to-Untrust 策略上启用 Source Nat。我不确定为什么需要它(Trust-to-Untrust 的默认策略没有它)。您可以在策略的高级部分中启用该选项,或者更改上面发布的行:
set policy id 2 from "Wifi" to "Untrust" "Any" "Any" "ANY" permit log
到:
set policy id 2 from "Wifi" to "Untrust" "Any" "Any" "ANY" nat src permit log