Fortinet FortiGate 4000 Benutzerhandbuch
64
Fortinet Inc.
Using the command line interface
NAT/Route mode installation
Using the command line interface
As an alternative to using the setup wizard, you can configure the FortiGate unit using
the command line interface (CLI). For information about connecting to the CLI, see
the command line interface (CLI). For information about connecting to the CLI, see
.
Configuring the FortiGate unit to operate in NAT/Route mode
Use the information that you gathered in
following procedure.
Configuring NAT/Route mode IP addresses
1
Make sure that you are logged into the CLI.
2
Set the IP address and netmask of the internal interface to the internal IP address and
netmask that you recorded in
netmask that you recorded in
. Enter:
set system interface internal mode static ip <IP_address>
<netmask>
Example
set system interface internal mode static ip 192.168.1.1
255.255.255.0
<netmask>
Example
set system interface internal mode static ip 192.168.1.1
255.255.255.0
3
Set the IP address and netmask of the external interface to the external IP address
and netmask that you recorded in
and netmask that you recorded in
set system interface external mode static ip <IP_address>
<netmask>
Example
set system interface external mode static ip 204.23.1.5
255.255.255.0
To set the external interface to use DHCP, enter:
set system interface external mode dhcp connection enable
To set the external interface to use PPPoE, enter:
set system interface external mode pppoe username <user name>
password <password> connection enable
Example
set system interface external mode pppoe username
user@domain.com password mypass connection enable
<netmask>
Example
set system interface external mode static ip 204.23.1.5
255.255.255.0
To set the external interface to use DHCP, enter:
set system interface external mode dhcp connection enable
To set the external interface to use PPPoE, enter:
set system interface external mode pppoe username <user name>
password <password> connection enable
Example
set system interface external mode pppoe username
user@domain.com password mypass connection enable
4
Confirm that the addresses are correct. Enter:
get system interface
The CLI lists the IP address, netmask, and other settings for each of the FortiGate
interfaces.
get system interface
The CLI lists the IP address, netmask, and other settings for each of the FortiGate
interfaces.
5
Set the primary DNS server IP addresses. Enter
set system dns primary <IP address>
Example
set system dns primary 293.44.75.21
set system dns primary <IP address>
Example
set system dns primary 293.44.75.21