IPアドレス設定
editで、対象IFを指定します。
modeは、元々DHCPだったので、Staticに変更します。
その後、IPアドレスを設定し、最後にendします。
end投入すると、設定保存されるようです。
FGT40C3912023132 (interface) # edit wan1
FGT40C3912023132 (wan1) # set mode static
FGT40C3912023132 (wan1) # set ip 192.168.2.2 255.255.255.0
FGT40C3912023132 (wan1) # end
今回変更する対象IF
FGT40C3912023132 # show system interface
config system interface
edit "wan1"
set mode dhcp
set allowaccess ping fgfm auto-ipsec
set type physical
set snmp-index 1
next
mode DHCPの状態で、手動でIPアドレスを設定しようとすると下記エラー表示
FGT40C3912023132 (wan1) # set ip 192.168.1.2 255.255.255.0
Can't change dynamic IP
他のIFと同じセグメントのIP指定すると、重複(overlap)指摘される
internalインタフェースと被ってるので、設定破棄しましたと。。
FGT40C3912023132 (wan1) # end
Subnets overlap between 'wan1' with primary IP of 'internal'
attribute set operator error, -54, discard the setting
Command fail. Return code -54
設定後のpingも問題なし
FGT40C3912023132 # execute ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
64 bytes from 192.168.2.1: icmp_seq=0 ttl=255 time=11.4 ms
64 bytes from 192.168.2.1: icmp_seq=1 ttl=255 time=0.7 ms
64 bytes from 192.168.2.1: icmp_seq=2 ttl=255 time=0.7 ms
64 bytes from 192.168.2.1: icmp_seq=3 ttl=255 time=0.7 ms
64 bytes from 192.168.2.1: icmp_seq=4 ttl=255 time=0.7 ms
プロトコルの許可
set allowaccessで指定されたプロトコルの通信のみ、許可されます。
現状、telnetだけしか許可されていないので、対向ルーターからping飛びません。
Fortigate # show system interface
config system interface
edit "wan1"
set ip 192.168.2.2 255.255.255.0
set allowaccess telnet
set type physical
set snmp-index 1
next
対向ルーターのping結果
Router#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router#
対向ルーターから、FWへtelnet
Router#telnet 192.168.2.2
Trying 192.168.2.2 ... Open
Fortigate login: admin
Password:
Welcome !
Fortigate #
Fortigate #
Pingの許可
Fortigate # config system interface
Fortigate (interface) # edit wan1
Fortigate (wan1) # set allowaccess
ping PING access.
https HTTPS access.
ssh SSH access.
snmp SNMP access.
http HTTP access.
telnet TELNET access.
fgfm FortiManager access.
auto-ipsec IPsec auto-configuration.
radius-acct RADIUS accounting access.
probe-response Probe access.
capwap CAPWAP access.
Fortigate (wan1) # set allowaccess
Fortigate (wan1) # set allowaccess ping
Fortigate (wan1) # end
Router#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Router#