Заметки сисадмина

Заметки сисадмина о интересных вещах из мира IT, инструкции и рецензии. Настраиваем Компьютеры/Сервера/1С/SIP-телефонию в Москве



Firefox: Disable cache in Firefox using preferences.

2024-04-19 · Posted in HTML

You need to disable two entries in the Firefox preferences to stop local storage of cache. Here’s how:

Type about:config in the Firefox address bar and hit Enter. A warning message will be displayed; you need to accept it to move forward.

Here in the search bar, copy/paste the below-mentioned preferences one by one and turn their value to False.

Afterward, restart the browser, and Firefox will stop using cache. The first preference mentioned above prevents Firefox from storing cache on the hard disk and the second one stops it from storing cache in the PC memory. This effectively disables the cache.

You can also undo these changes to enable cache again.

Firefox: Файл не загружен. Потенциальная угроза безопасности.

2024-04-19 · Posted in HTML

Браузер Mozilla Firefox, начиная с версии 92, стал блокировать загрузки файлов по протоколу HTTP, выдавая сообщение “Файл не загружен. Потенциальная угроза безопасности“.

Для продолжения загрузки файла, загружаемого по протоколу HTTP, требуется дополнительно подтвердить его загрузку, что довольно неудобно.

Для отключения данного сообщения, нужно открыть расширенные настройки браузера, набрав в адресной строке about:config, после чего в строке поиска ввести следующий параметр:

И меняем его значение на false.

После этого, браузер перестанет блокировать загрузку файлов по HTTP.

Обнаружена обновленная политика цифровых подписей

Включаем Тестовый режим Windows:

Изменение настроек через командную строку также позволит отменить проверку подписей до следующего ручного включения. Чтобы изменить настройки этим способом, проделайте следующее:

1)Введите слово cmd в поиске на панели задач. Среди результатов выберите пункт Командная строка, кликните по нему ПКМ и в контекстном меню нажмите на строку Запуск от имени администратора.

2)Скопируйте в консоль команду  и нажмите Enter:

3)Примените команду:

4)Выполните последнюю команду:

Командная строка

5)Перезагрузите операционную систему для применения новых настроек.

Подпишем MultiKey самостоятельно:

Подразумевается, что у Вас установлен MultiKey, но в диспетчере задач у значка восклицательный знак. В описании ошибки написано: «Не удалось загрузить драйвер этого устройства. Возможно, драйвер поврежден или отсутствует. Сертификат отозван».

Для самостоятельной подписи MultiKey необходимо скачать:

https://www.ngohq.com/driver-signature-enforcement-overrider.html

driver_signature_enforcement_overrider

Запускаем программу. Эта программа не устанавливается. У программы есть небольшой диалоговый мастер, который распаковывает версию программы в ОЗУ. В первом окне выбираем пункт Sign a System File:

Выбираем нужный раздел программы

Далее нужно указать путь до установленного драйвера в системе. Важно указать путь именно на установленный MultiKey. В нашем случае это путь:

Указываем на установленный Multikey

Перезагружаем компьютер.

После загрузки, в диспетчере устройств пропадет восклицательный знак и то, для чего вы ставили MultiKey, будет работать как нужно.

Zyxel ZyWall: How to route multiple public static IPs

How to route multiple public IPs to devices behind a Zyxel router, where the device behind the Zyxel holds a public IP.  Typically this method is used when routers are connected behind the Zywall.

Method 1:

Use this method to provide “no NAT” to the device behind the Zyxel.  This method only works when their is a router in front of the Zyxel so that both the Zyxel and the device behind the Zyxel can use the same gateway.
Go to Network>Interface>Bridge

  1. Set Interface type to: external
  2. Interface name: br1
  3. Zone: WAN
  4. Members: WAN1,dmz
  5. Go to Network>Interface>Trunk and create a new Trunk Group with “br1” as the primary member
  6. Go to Object>Address and add a host for each usable public static IP
  7. If the device behind the Zyxel is a router, Go to Security Policy > Session Control and disable the session limits
  8. Configure the device behind the Zyxel with a usable public static IP and point it to the same gateway that Zyxel is using.
  9. Plug device behind the Zyxel into a DMZ port.
  10. Add a route in the Zyxel that states: Incoming > Interface: DMZ > Source Address: Object_Address_PublicIP > Destination: Any > Next hop: Interface br1 > SNAT: Object_Address_PublicIP

Method 2:

is the same as method 1 but where a modem is in front of the Zyxel instead of a router.  In this case the Zyxel has to act as a gateway for both itself and the devices behind it.

  1. Go to Network>Interface>Bridge
  2. Set Interface type to: external
  3. Interface name: br1
  4. Zone: WAN
  5. Members: WAN1,dmz
  6. Set the IP to automatic if the Public static is obtained via DHCP (note that the mac address used will not be the MAC of WAN1 even when interface WAN1 is used)
  7. Go to Network>Interface>Bridge and click on “Create Virtual Interface”>Enter the first usable public IP address and subnet mask and leave gateway blank
  8. Go to Network>Interface>Trunk and create a new Trunk Group with “br1” as the primary member Then set the new Trunk Group as the system default trunk
  9. Go to Network>Interface>port role and set one of the ports as a DMZ
  10. Plug in a device or switch into the DMZ port and enter the second usable public IP into the device and set the Virtual Interface IP as the gateway
  11. Make sure the firewall is set say that any to DMZ and DMZ to any is allow.
  12. Go to network Zones and make sure that interzone blocking for both WAN and DMZ is set to “no”
  13. The router is now running in dual mode.  LAN1 is NAT and DMZ is no NAT

In cases where the devices behind the Zyxel hold private IPs because they required firewall protection. Typically this method is used when servers are connected behind the Zyxel.

Method 1:

is 1:1 NAT and is used if firewall functionality is desired.  This method only works when their is a router in front of the Zyxel so that both the Zyxel and the device behind the Zyxel can use the same gateway.

  1. *Go to Object>Address and add a host for each public static IP
  2. *Go to NAT and add a rule that says: 1:1 NAT Type>Interface WAN1>Orginal IP=Public address>Mapped IP=private IP of device
Method 2:

is the same as method 1 but where a modem is in front of the Zyxel instead of a router.  In this case the Zyxel has to act as a gateway for both itself and the devices behind it for the second block of IPs.

  1.  Have the cable provider bind the MAC address of the WAN to the public static IP they provide.
  2.  Have the cable provider route the second block of IPs to the public static held by Zyxel WAN
  3.  Add a virtual interface to the WAN and assign it the first usable IP of the second IP block.  Example if the carrier provides a block of 1.2.3.88/29, then the virtual interface would be  .2.3.89 255.255.255.248 (leave the gateway blank)
  4.  Go to Network > Object Address and add an Address Host Object for each remaining Public IP address of the 2nd block
  5.  Also add Host Objects for each device behind the Zyxel that you will be NATing public IPs to
  6.  Go got Network > Routing and add a route for each device behind the Zyxel and the public IP it supposed to route out on: Incoming = LAN1 > Source=DeviceBehindZyxel >  estination=any > Service=any > NextHop=WAN (don’t use the virtual interface) > SNAT=One of the Public IPs
    The check box to “use Policy route to override Direct Route can stay “off”
  7.  Go to Security Policy > Policy Control > From=WAN > To=LAN1 > Source=any > Destination=device behind zyxel > Service=define the service > allow
  8.  Go to Network > NAT > classification=1:1NAT > Incoming=WANinterface > Original IP=The public IP being NATed to the device > Mapped IP=device behind zyxel > Service=define the service > Loopback=”off”

A single block of 5 should be fine.  If you want to assign a public static to .9, .10, .11 respectively, then follow these steps:
In cases where the devices behind the Zyxel hold private IPs because they required firewall protection. Typically this method is used when servers are connected behind the Zyxel.
Method 1 is 1:1 NAT and is used if firewall functionality is desired.  This method only works when their is a router in front of the Zyxel so that both the Zyxel and the device behind the Zyxel can use the same gateway.

  1. Go to Object>Address and add a host for each public static IP
  2. Go to NAT and add a rule that says: 1:1 NAT Type>Interface WAN1>Orginal IP=Public address>Mapped IP=private IP of device

Очистка метаданных контроллера домена в Active Directory

2024-04-08 · Posted in Active Directory

Для выполнения данной задачи могут быть использованы различные инструменты: оснастки MMC графической оболочки и утилиты командной строки, в данной статье мы рассмотрим оба способа.

Очистка метаданных с помощью средств графического интерфейса

Данный способ доступен начиная с Windows Server 2008 и предполагает использование оснасток MMC либо на самом сервере, либо на компьютере администратора с установленным пакетом RSAT. Для того, чтобы очистить метаданные запустите оснастку Active Directory — пользователи и компьютеры (dsa.msc) и подключитесь к любому работающему контроллеру домена, при запуске оснастки на самом контроллере это будет сделано автоматически.

Затем раскройте нужный домен и перейдите в контейнер Domain Controllers, выберите контроллер, метаданные которого нужно очистить и выполните для него команду Удалить (через меню правой кнопки мыши).

ad-ds-metadata-cleanup-001.png

Подтверждаем удаление, в следующем окне с предупреждением установите флаг Все равно удалить этот контроллер домена. Он постоянно отключен, и его невозможно удалить с помощью мастера удаления и нажмите кнопку Удалить. Будьте внимательны, чтобы по ошибке не удалить действующий контроллер.

ad-ds-metadata-cleanup-002.png

Если удаляемый контроллер содержал роли хозяев операций, то они будут переданы оставшимся контроллерам произвольным образом, о чем вы получите еще одно предупреждение. Таким образом вам не потребуется захватывать роли вручную.

ad-ds-metadata-cleanup-003.png

После удаления контроллера откроем оснастку Active Directory сайты и службы (dssite.msc), перейдите в контейнер Servers и убедитесь, что контроллер домена, который вы удалили не содержит вложенных объектов NTDS, после чего сам объект контроллера следует удалить.

ad-ds-metadata-cleanup-004.png

На этом очистка метаданных для удаленного контроллера домена завершена.

Очистка метаданных с помощью командной строки

Вы также можете очистить метаданные при помощи командной строки, для этого используется утилита ntdsutil, которая автоматически устанавливается на каждом контроллере домена, а также входит в состав пакета RSAT. Все последующие действия нужно выполнять, обладая правами Администратора домена.

Откроем командную строку и наберем в ней:

Все последующие действия будут производиться в контексте этой утилиты. Затем выполним для перехода в режим очистки метаданных:

Теперь соединимся с любым работающим контроллером домена:

В данном контексте наберите:

и вернитесь в режим очистки метаданных:

ad-ds-metadata-cleanup-005.png

Теперь перейдем в режим выбора цели:

Первым делом получим список доменов:

В полученном выводе находим номер нужного нам домена, если домен один, то это будет ноль и указываем его в следующей команде:

Где # – номер выбранного домена.

ad-ds-metadata-cleanup-006.png

Аналогичным образом выберем и укажем сайт:

Затем:

После чего получим список контроллеров в сайте и выберем нужный из них:

и

Будьте внимательны, не удалите работающий контроллер домена!

ad-ds-metadata-cleanup-007.png

Выбрав необходимый контроллер, вернемся в режим очистки метаданных:

И удалим метаданные контроллера командой:

В окне предупреждения еще раз внимательно изучим всю информацию и подтвердим удаление.

ad-ds-metadata-cleanup-008.png

После удаления откройте оснастку Active Directory сайты и службы (dssite.msc) и убедитесь, что удаленный контроллер не содержит вложенных объектов NTDS, после чего его следует удалить.

Также обратите внимание, что роли хозяев операций при этом способе перенесены не будут и их потребуется захватить вручную. Это можно сделать как при помощи ntdsutil, так и с помощью PowerShell.