fortinet fortigate

IVP

Почетный гость
Всем добрый день.
Есть в наличии сертифицированный ФСТЕК межсетевой экран FortiGate 301E. firmware 5.4.1. В версии реализована защита от уязвимости web интерфейса. Одним словом web интерфейс управления отключается через n-количество времени. При попытке ввода логина и пароля происходит редирект на страницу ввода логина и пароля. И так по кругу. После полного ребута FortiGate доступ к web интерфейсу восстанавливается на n-количество времени. CLI естественно доступно всегда. В документации, которая в комплекте на этот сертифицированный экран написано, что основным инструментом управления является CLI и web интерфейс служит только для первоначальной настройки. Но в связи со спецификой работы, СLI не лучший вариант для оперативного управления и мониторинга. Вопрос. Возможно, кто нибудь знает о существовании какого нибудь "костыля" (кроме ребута), который поможет использовать web интерфейс ?
 
1) Interface settings

GUI access, HTTP and/or HTTPS, has to be enabled on the interface.

CLI commands:
# config system interface
edit <interface name>
set allowaccess ping http https
end​
Possible allow access settings: PING, HTTP, HTTPS, TELNET, SSH, FGFM (FGFM is required for FortiManager access)

2) Trusted host configuration

If 'trusted hosts' are configured, IP address of the computer used for the GUI access must be allowed as "trusted host". A whole subnet can be allowed as "trusted host".

By default, trusted host settings are not configured, and administrative access is not restricted to any specific user IP addresses.

Sample trusted host configuration:
# show
# config system admin
edit "admin-test"
set trusthost1 10.10.10.1 255.255.255.255
set trusthost2 192.168.0.0 255.255.0.0
set vdom "root"
# config dashboard-tabs
...​
Changing the trusted host configuration:
# config system admin
edit <admin user>
set trusthost <1 to 10> <ip address>/<mask>
set ip6-trusthost <1 to 10> <ip6 address>/<mask>​
Trusted host settings are per admin user, and are valid for all types of access.
Example: If a user is trusted for access through SSH, it is also trusted for HTTP or HTTPS access.

3) MTU along the path.

After the first few synchronization and handshake packets, the web admin GUI HTTP and HTTPS packets can become larger than 1500 bytes.
Example: When a FortiGate network interface is connected to a network segment that supports such extended size packets. For Telnet or SSH, packets typically remain of smaller size.

To be then able to use the web admin GUI, the fragmentation must be allowed at certain points in the network infrastructure (points, where a jumbo-frame reaches a network segment that does not support it), or Jumbo frames must be allowed along the whole communication path.

Note about Jumbo frames: Jumbo frames are packets that are larger than the standard 1500 maximum transmission unit (MTU) size. Jumbo frames increase data transfer speeds by carrying more data per frame, reducing the overhead from headers.
All networks that carry jumbo frames must have network devices that all support jumbo frames. Otherwise, jumbo frames will be dropped, when they reach network devices that do not support them.

4) Admin access ports.

By default, for admin login via GUI, the HTTPS port is configured to 443 and the HTTP port to 80.

If those default settings are changed, access to the GUI will not be possible without specifying the custom-port used at the end of the URL.

To verify which HTTPS/HTTP ports are configured for admin access:
# show full | grep admin-port
set admin-port 80
TestFGT # show full | grep admin-sport
set admin-sport 443​
In the event that the default ports have been changed, either directly access the GUI using the specific port that is currently defined:
http(s)://<address_of_appliance>:<custom port>

For example: http://192.168.0.101:222 where 222 is the non-default port used to access GUI via HTTP.

If the ports needs to be changed to a new value or the default value, use the following syntax for HTTP access:
# config system global
set admin-port <integer>
end
Whereas for HTTPS access, use the syntax:
# config system global
set admin-sport <integer>
end
5) admin-server-cert (for versions 5.6 and above only).

Enable the following debug and try to access the GUI again:
# diagnose debug application httpsd -1
# diagnose debug enable
If the output is matching the following:
[httpsd 1746 - 1552998712 error] log_error_core[439] -- [Tue 19 12:31:52 2019] [crit] Can't open certificate file /tmp/admin_server.crt, nor /ssl/certs//tmp/admin_server.crt
[httpsd 1749 - 1552998714 error] log_error_core[439] -- [Tue 19 12:31:54 2019] [crit] Can't open certificate file /tmp/admin_server.crt, nor /ssl/certs//tmp/admin_server.crt
[httpsd 1752 - 1552998716 error] log_error_core[439] -- [Tue 19 12:31:56 2019] [crit] Can't open certificate file /tmp/admin_server.crt, nor /ssl/certs//tmp/admin_server.crt
Proceed with the following:
# config sys global
set admin-server-cert Fortinet_Factory
end
6) Existing virtual IP is overriding admin HTTP or HTTPS ports.

When a Virtual IP (VIP) has the same IP address of FortiGate interface and forwarding the same ports used for HTTP/HTTPS access (example 80 or 443), the VIP will override the administrative access.
This should either be removed or changed such that it doesn’t overlap with FortiGate HTTP/HTTPS ports.
This can be verified by checking the VIP list on FortiGate (Policy & Objects -> Virtual IPs) or running the debug flow.
Refer to the KB article FD31702 referenced below.

7) Restart HTTPS Daemon

In case none of the processes above fixed the issue, please try to restart the HTTPS Daemon.
# dia sys process pidof httpsd
- Note the first listed process ID (this is the parent process).
# dia sys kill XX <----- Add the process ID gathered in step 1.
- This restarts httpsd​

via
 
Он вас по таймауту выкидывает ? Посмотрите какая настройка здесь:
By default, the web-based manager disconnects administrative sessions if no activity
takes place for 5 minutes. This idle timeout is recommended to prevent someone from
using the web-based manager from a PC that is logged into the web-based manager and
then left unattended. However, you can use the following steps to change this idle timeout.

To change the web-based manager idle timeout
1 Go to System > Admin > Settings.
2 Change the Idle Timeout minutes as required.
 
Он вас по таймауту выкидывает ? Посмотрите какая настройка здесь:

1 Go to System > Admin > Settings.
2 Change the Idle Timeout minutes as required.
Да конечно все таймауты выкручены на максимум. Это дает большее время работы в веб интерфейсе. Но он в любом случае конечен и истекает. После чего доступ лочиться.
1) Interface settings

GUI access, HTTP and/or HTTPS, has to be enabled on the interface.

CLI commands:

Possible allow access settings: PING, HTTP, HTTPS, TELNET, SSH, FGFM (FGFM is required for FortiManager access)

2) Trusted host configuration

If 'trusted hosts' are configured, IP address of the computer used for the GUI access must be allowed as "trusted host". A whole subnet can be allowed as "trusted host".

By default, trusted host settings are not configured, and administrative access is not restricted to any specific user IP addresses.

Sample trusted host configuration:

Changing the trusted host configuration:

Trusted host settings are per admin user, and are valid for all types of access.
Example: If a user is trusted for access through SSH, it is also trusted for HTTP or HTTPS access.

3) MTU along the path.

After the first few synchronization and handshake packets, the web admin GUI HTTP and HTTPS packets can become larger than 1500 bytes.
Example: When a FortiGate network interface is connected to a network segment that supports such extended size packets. For Telnet or SSH, packets typically remain of smaller size.

To be then able to use the web admin GUI, the fragmentation must be allowed at certain points in the network infrastructure (points, where a jumbo-frame reaches a network segment that does not support it), or Jumbo frames must be allowed along the whole communication path.

Note about Jumbo frames: Jumbo frames are packets that are larger than the standard 1500 maximum transmission unit (MTU) size. Jumbo frames increase data transfer speeds by carrying more data per frame, reducing the overhead from headers.
All networks that carry jumbo frames must have network devices that all support jumbo frames. Otherwise, jumbo frames will be dropped, when they reach network devices that do not support them.

4) Admin access ports.

By default, for admin login via GUI, the HTTPS port is configured to 443 and the HTTP port to 80.

If those default settings are changed, access to the GUI will not be possible without specifying the custom-port used at the end of the URL.

To verify which HTTPS/HTTP ports are configured for admin access:

In the event that the default ports have been changed, either directly access the GUI using the specific port that is currently defined:
http(s)://<address_of_appliance>:<custom port>

For example: http://192.168.0.101:222 where 222 is the non-default port used to access GUI via HTTP.

If the ports needs to be changed to a new value or the default value, use the following syntax for HTTP access:

Whereas for HTTPS access, use the syntax:

5) admin-server-cert (for versions 5.6 and above only).

Enable the following debug and try to access the GUI again:

If the output is matching the following:

Proceed with the following:

6) Existing virtual IP is overriding admin HTTP or HTTPS ports.

When a Virtual IP (VIP) has the same IP address of FortiGate interface and forwarding the same ports used for HTTP/HTTPS access (example 80 or 443), the VIP will override the administrative access.
This should either be removed or changed such that it doesn’t overlap with FortiGate HTTP/HTTPS ports.
This can be verified by checking the VIP list on FortiGate (Policy & Objects -> Virtual IPs) or running the debug flow.
Refer to the KB article FD31702 referenced below.

7) Restart HTTPS Daemon

In case none of the processes above fixed the issue, please try to restart the HTTPS Daemon.

- Note the first listed process ID (this is the parent process).

- This restarts httpsd​

via
Эти варианты решения тоже не помогают. Доступ есть, но до истечения какого то n-времени. Почему то всегда по разному. Прибитие процесса тоже не помогает. Так же Если в CLI смотреть зарегистрированных пользователей на данный момент, то видно, что пользователь прошел регистрацию как web, но сама web оболочка просто редиректит на страницу логина и пароля.
Это ограничение в самой прошивке. И стандартными методами обойти это ограничение не получается. Железка сертифицирована ФСТЭК. В свое время была выявлена уязвимость безопасности web интрфейса, и, по видимому, при сертификации решили не париться решением этой проблемы, заложив "бомбу", которая имеет свой таймаут. Посчитали, что для первоначальной настройке админу будет достаточно времени на конфиг через web (о чем они указали честно в админгайд), а в дальнейшем, для закрытия уязвимости, доступ к web лочиться.
В тех.поде отправили с этим вопросом к техподу вендора, который торгует сертифицированными железками. Тот в свою очередь ответил, что это нормальная работа сертифицированного продукта. При чем при продаже, как всегда у нас бывает, умолчали о такой вот маленькой особенности. Это конечно наверное не важно когда железку настроил и забыл. А когда в течении дня необходимо, что то настраивать, мониторить и тд такой вариант неудобен. Поэтому возник вопрос, возможно есть какое то неофициально решение.
Спасибо, что не оставили без ответа.
 
для закрытия уязвимости, доступ к web лочиться
Если есть уязвимость, значит и заплатка от нее есть. Я бы начал с попыток обновить firmware. Хотя по-моему эта железка уже старовата и EOL
 
Хотя по-моему эта железка уже старовата и EOL
Вы заблуждаетесь
ProductEnd of Order Date (EOO)End of Support Date (EOS)
FortiGate-301E2021-07-152026-07-15
FortiGate-3040B2016-09-132021-09-13
FortiGate-3040B-DC2017-11-232022-11-23
FortiGate-3040B-LENC2014-07-092019-07-09
 
Доступ есть, но до истечения какого то n-времени.
мне кажется это нормально что Вас вышибает из админки по неактивности, многие клиент-банки делают примерно тоже самое из соображений безопасности. Что правильно вобщем-то😉
 
Прошивку на этой железяке просто так не сменить. Железка сертифицирована ФСТЭК и любая смена прошивки на отличную от указанной в формуляре приведет к автоматической потере сертификата со всеми вытекающими.
мне кажется это нормально что Вас вышибает из админки по неактивности, многие клиент-банки делают примерно тоже самое из соображений безопасности. Что правильно вобщем-то😉
да это нормально и правильно, если есть возможность в эту админку вернуться по логину и паролю. В нашем случае в админку вернуться нельзя пока не ребутнешь железяку.
А нельзя редирект отключить на страницу авторизации ??
вот это уже ближе. Как вариант. Только как это сделать? Вопрос. Для начала попасть бы в ОС. По SSH доступна только CLI.
 
From the GUI go to System -> Settings -> Administrator Settings and select check box 'Redirect to HTTPS' to make sure that all attempted HTTP login connections are redirected to HTTPS.

From the CLI.

With VDOM enable.
Это же вроде как перенаправление всех запросов HTTP на HTTPS. Отправлять будет точно так же на страницу авторизации только по https.
 
From the GUI go to System -> Settings -> Administrator Settings and select check box 'Redirect to HTTPS' to make sure that all attempted HTTP login connections are redirected to HTTPS.

From the CLI.

With VDOM enable.
эт не то. Это редирект http -> https
 
By default, the web-based manager disconnects administrative sessions if no activity
takes place for 5 minutes.
Можно попробовать скриптом как то обнулять этот параметр, что бы как будто всегда активность была, но хз будет ли это работать или нет.

По идее если вы используете web морду, не должно выбрасывать по неактивности.
 
Назад
Верх Низ