Включение SSL для PostfixAdmin

postfixadminВключение SSL для PostfixAdmin может быть полезно, если вы хотите выставить админку наружу. Выполнять все задачи администрирования, передавая данные в открытом виде, не очень хорошая идея. Это может быть оправдано лишь в том случае, если администрирование осуществляется исключительно из локальной сети, а доступа из интернета к PostfixAdmin нет. К сожалению, один мой почтовый сервер имел только внешний адрес, никакого NAT’а не было и пришлось подумать о некоторой защищенности, о чем я и расскажу в этой статье.

Поскольку PostfixAdmin является лишь дополнением для MTA Postfix, он ожидаемо находится в иерархии статей по настройке Postfix.


Найти больше информации о Postfix вы можете в основной статье по его настройке — Настройка Postfix.


Включение SSL для PostfixAdmin

Первым делом необходимо создать сертификат и уже потом на его основе открывать доступ по 443 порту.

Создание сертификата

Если не указывать полные пути к файлам, то все будет происходить в текущем каталоге. Узнать где вы сейчас находитесь можно командой:

Отлично, переходим к процессу создания сертификата. Суть в том, что нужно получить публичный сертификат, который мы можем распространять куда и кому угодно, и закрытый (частный) ключ от этого сертификата. Обладатель этого ключа сможет расшифровать любую информацию, которая была зашифрована публичным сертификатом. Отсюда ограничения — мы обязаны обеспечить безопасное хранение частного ключа. Как это сделать? В принципе можно зашифровать этот ключ, но есть один неприятный момент — apache2 будет постоянно запрашивать пароль от этого ключа при запуске демона. Не самый удобный вариант, поэтому можно держать ключ в расшифрованном виде, назначив на него необходимые разрешения (доступ только для root). Так и сделаем:

nodes как раз говорит о том, что частный ключ сертификата не будет зашифрован. Кстати, в документации 1 apache2 очень подробно написано про сертификаты и самые распространенные действия над ними, советую обязательно почитать.

Из текущего расположения копируем сертификаты в традиционное хранилище

Назначаем необходимые права, как я и говорил выше. Сразу проверяем кто имеет доступ к файлу.

Права только у root’а, отлично. Подчищаем все в текущем каталоге:

Сертификат и его частный ключ готовы, пора подружить с ним apache2.

Настройка Apache

Подключаем модуль SSL:

Собственно сама команда является скриптом, подключающим определенные модули (в моем случае модуль SSL) к конфигурации Apache2, создавая символьные ссылки в каталоге /etc/apache2/mods-enabled. Впрочем это вы и так можете узнать из мануала (команда man a2enmod).

Активируем виртуальный сайт:

Теперь пришло время внести в конфигурацию SSL некоторые изменения:

Необходимо убедиться, что параметр SSLEngine определен и имеет значение on, а также задать используемые версии SSL/TLS. Поскольку SSL версий 2 и 3 уже устарел, лучше исключить их из использования, оставив только TLS. Итого, необходимо, чтобы в файле присутствовали следующие строчки:

По умолчанию all = +SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2, но, как я и говорил выше, я хочу отключить SSLv3. Подробнее читайте в официальной документации 2.

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

Теперь пришло время позаботиться об автоматическом перенаправлении клиентов на защищенный порт. Для этого активируем модуль alias:

Отредактируем файл:

Добавив в описание VirtualHost следующую директиву:

Я указал простой локальный адрес, поскольку пока тестирую сервер внутри сети. Когда я решу выставить админку наружу (если вообще решу), нужно будет установить в настройках публичный адрес сервера или же его доменное имя, которое у вас в любом случае должно быть, ведь вы настраиваете почтовый сервер.

Ну а теперь можно перезапускать apache2:

Проблем с перезапуском не возникло, можно проверить как все работает, вбив в адресной строке http://192.168.1.120/postfixadmin. После этого вас должно перенаправить на https-страницу и сообщить о ненадежном сертификате (все правильно, ведь мы используем самозаверенный сертификат):

Включение SSL для PostfixAdmin 02

Настройка на этом завершена.

comments powered by HyperComments
write a dissertation abstract
2022-07-05 15:44:24
<strong>phd dissertation writing help https://professionaldissertationwriting.org/</strong>
dissertation thesis
2022-07-05 18:18:18
<strong>writing dissertation proposal https://professionaldissertationwriting.com/</strong>
buy dissertations online
2022-07-05 20:44:33
<strong>writing doctoral dissertation https://helpwithdissertationwritinglondon.com/</strong>
dissertation help methodology
2022-07-05 22:27:05
<strong>cheap dissertation writing https://dissertationwritingcenter.com/</strong>
define dissertation
2022-07-06 00:57:30
<strong>write a dissertation abstract https://dissertationhelpexpert.com/</strong>
writing dissertations
2022-07-06 08:42:26
<strong>writing dissertation and grant proposals https://writing-a-dissertation.net/</strong>
writing dissertation
2022-07-06 11:07:21
<strong>define dissertation https://bestdissertationwritingservice.net/</strong>
tips for dissertation writing
2022-07-06 15:35:23
<strong>ucl dissertation help https://businessdissertationhelp.com/</strong>
order a dissertation
2022-07-06 17:52:30
<strong>dissertation writing tutors https://customdissertationwritinghelp.com/</strong>
help with dissertation writing
2022-07-06 19:59:22
<strong>tips for writing dissertation https://writingadissertationproposal.com/</strong>
dissertation writing support
2022-07-06 23:03:41
<strong>doctoral dissertation defense https://dissertationhelpspecialist.com/</strong>
help with dissertations
2022-07-07 02:22:40
<strong>art dissertation help https://dissertationhelperhub.com/</strong>
tips for writing dissertation
2022-07-07 05:34:45
<strong>psychology dissertation https://customthesiswritingservices.com/</strong>
new online casino no deposit bonus codes
2022-07-25 18:44:54
<strong>was bedeutetwaygern online casino https://download-casino-slots.com/</strong>
super slots online casino
2022-07-25 21:24:10
<strong>royal casino online https://firstonlinecasino.org/</strong>
bet mgm online casino
2022-07-26 00:24:10
<strong>codeshare online double down casino https://onlinecasinofortunes.com/</strong>
jack online casino
2022-07-26 01:39:17
<strong>borgata online casino bonus code https://newlasvegascasinos.com/</strong>
casino borgata online
2022-07-26 03:58:12
<strong>free online casino slots https://trust-online-casino.com/</strong>
san manuel online casino real money
2022-07-26 07:00:50
<strong>online casino roulette https://onlinecasinosdirectory.org/</strong>
online keno casino
2022-07-26 09:06:27
<strong>online casino with same day payout https://9lineslotscasino.com/</strong>
borgata free online casino
2022-07-26 12:05:35
<strong>gambling online casino https://free-online-casinos.net/</strong>
how to beat online casino slot machines
2022-07-26 15:00:09
<strong>online casino no minimum deposit https://internet-casinos-online.net/</strong>
play casino games online
2022-07-26 17:22:08
<strong>mychoice casino online https://cybertimeonlinecasino.com/</strong>
online casino in usa
2022-07-26 21:17:50
<strong>top online casino https://1freeslotscasino.com/</strong>
maryland live online casino
2022-07-26 22:56:22
<strong>online casino with free signup bonus real money no deposit https://vrgamescasino.com/</strong>
vegas x online casino login
2022-07-27 01:07:37
<strong>online casino ideal betaling https://casino-online-roulette.com/</strong>
online casino table games
2022-07-27 04:01:49
<strong>online casino ideal betaling https://casino-online-jackpot.com/</strong>
tiger casino online
2022-07-27 08:08:16
<strong>golden nugget online casino bonus code https://onlineplayerscasino.com/</strong>
online casino software
2022-07-27 09:42:01
<strong>best online casino usa https://ownonlinecasino.com/</strong>
new online casino no deposit bonus codes
2022-07-27 11:51:15
<strong>online casino software providers https://all-online-casino-games.com/</strong>
sweden online casino
2022-07-27 15:19:46
<strong>nj online casino list https://casino8online.com/</strong>
hola vpn chrome
2022-08-07 17:51:45
<strong>super vpn free download https://shiva-vpn.com/</strong>
free vpn download
2022-08-07 20:44:38
<strong>buy a vpn uk https://freehostingvpn.com/</strong>
free vpn\
2022-08-07 22:22:50
<strong>best vpn for xbox one https://ippowervpn.net/</strong>
hide.me vpn
2022-08-08 00:07:20
<strong>apple vpn free https://imfreevpn.net/</strong>
best mobile vpn
2022-08-08 02:52:22
<strong>best ree vpn https://superfreevpn.net/</strong>
best vpn trial
2022-08-08 06:44:58
<strong>best buy vpn router https://rsvpnorthvalley.com/</strong>
dad dating simulator gay uncensored
2022-08-23 15:29:32
<strong>about dating gay spanish men https://gay-singles-dating.com/</strong>
british gay men dating american gay men
2022-08-23 16:13:47
<strong>gay dating app https://gayedating.com/</strong>
chub mature gay bisexual dating
2022-08-23 19:14:04
<strong>gay dating sites for kids 10-14 https://datinggayservices.com/</strong>
meet singles free
2022-08-24 12:32:36
<strong>free chat online singles https://freephotodating.com/</strong>
match dating site
2022-08-24 16:09:02
<strong>dating websites https://onlinedatingbabes.com/</strong>
date online free site
2022-08-24 17:55:06
<strong>dating site sign up https://adult-singles-online-dating.com/</strong>
plenty fish free dating
2022-08-24 19:29:13
<strong>free dating site https://adult-classifieds-online-dating.com/</strong>
zoosk dating sitef
2022-08-24 22:43:10
<strong>local free dating sites https://online-internet-dating.net/</strong>
plentyoffish free online dating site
2022-08-25 01:13:44
<strong>dating sites adult https://speedatingwebsites.com/</strong>
adult date site
2022-08-25 02:32:25
<strong>hot dating match https://datingpersonalsonline.com/</strong>
sexy dating apps
2022-08-25 04:15:26
<strong>meet online https://wowdatingsites.com/</strong>
bbw dating
2022-08-25 07:45:28
<strong>ourtime dating site https://lavaonlinedating.com/</strong>
dating agency login
2022-08-25 10:24:56
<strong>farmers only dating https://freeadultdatingpasses.com/</strong>
dating simulator
2022-08-25 14:54:57
<strong>flirt dating site https://zonlinedating.com/</strong>
free online go
2022-08-25 15:43:42
<strong>adult dating https://onlinedatingservicesecrets.com/</strong>
sugarhouse casino online nj
2022-08-30 14:02:05
<strong>online casino paypal https://online2casino.com/</strong>
online casino big winners
2022-08-30 17:35:25
<strong>thunder valley online casino https://casinosonlinex.com/</strong>
gay chat phone
2022-09-03 00:28:07
<strong>gay chat roullette https://newgaychat.com/</strong>
ladybug chat noir gay
2022-09-03 05:31:56
<strong>gay chat webcam https://gaychatcams.net/</strong>
gay men chat rooms
2022-09-03 12:31:20
<strong>gay male video chat free https://gaychatspots.com/</strong>
free rulette gay chat
2022-09-03 14:48:18
<strong>wisconsin gay chat https://gay-live-chat.net/</strong>
nh gay chat
2022-09-03 22:48:53
<strong>free gay phone chat lines https://chatcongays.com/</strong>
free gay bi chat lines in seattle wa
2022-09-04 03:04:15
<strong>gay chat louisiana https://gayphillychat.com/</strong>
gay chub chat
2022-09-04 08:12:39
<strong>gay jerk off chat https://gaychatnorules.com/</strong>
free gay mens chat phone
2022-09-04 10:57:53
<strong>frre gay wedcam chat https://gaymusclechatrooms.com/</strong>
gay chat mesa az
2022-09-04 16:28:39
<strong>gay chat city https://free-gay-sex-chat.com/</strong>
free gay video chat r
2022-10-20 17:18:15
<strong>gay chat 877 *** 7000 https://gaymanchatrooms.com/</strong>
cheap paper writing services
2022-10-20 18:31:48
<strong>buy papers online cheap https://term-paper-help.org/</strong>
scientific paper writing services
2022-10-20 19:58:24
<strong>college papers for sale https://sociologypapershelp.com/</strong>
buy a paper for college
2022-10-20 20:51:45
<strong>cheapest paper writing service https://uktermpaperwriters.com/</strong>
academic paper writing services
2022-10-20 22:23:43
<strong>paper writer service https://paperwritinghq.com/</strong>
write my paper for me in 3 hours
2022-10-20 23:55:58
<strong>pay someone to do my paper https://writepapersformoney.com/</strong>
custom written paper
2022-10-21 01:04:11
<strong>buy writing paper https://write-my-paper-for-me.org/</strong>
paying someone to write a paper
2022-10-21 02:02:37
<strong>websites that write papers for you https://doyourpapersonline.com/</strong>
what are the best paper writing services
2022-10-21 04:51:07
<strong>custom papers for college https://researchpaperswriting.org/</strong>
buy a college paper
2022-10-21 06:35:44
<strong>where to buy papers https://cheapcustompaper.org/</strong>
i will pay you to write my paper
2022-10-21 09:23:07
<strong>cheap custom papers https://buyessaypaperz.com/</strong>
custom papers for college
2022-10-21 10:32:06
<strong>english paper help https://mypaperwritinghelp.com/</strong>
custom papers
2022-10-21 12:29:27
<strong>pay for a paper https://writemypaperquick.com/</strong>
help with college papers
2022-10-21 17:13:10
<strong>order a paper https://ypaywallpapers.com/</strong>
writing paper services
2022-10-21 18:12:45
<strong>online paper writing services https://studentpaperhelp.com/</strong>
2december
2023-01-26 22:32:41
<strong>1openings</strong>
coursework writer uk
2023-02-05 16:05:14
<strong>creative writing coursework ideas https://courseworkninja.com/</strong>
do my coursework online
2023-02-05 18:00:53
<strong>coursework help university https://writingacoursework.com/</strong>
coursework
2023-02-05 20:55:50
<strong>do my coursework for me https://courseworkdownloads.com/</strong>
degree coursework
2023-02-05 21:25:47
<strong>coursework marking https://courseworkinfotest.com/</strong>
coursework psychology
2023-02-05 22:31:21
<strong>database coursework https://coursework-expert.com/</strong>
coursework service
2023-02-06 00:17:13
<strong>coursework writing service uk https://teachingcoursework.com/</strong>
coursework help university
2023-02-06 01:10:05
<strong>coursework help university https://buycoursework.org/</strong>
custom coursework
2023-02-06 02:47:32
<strong>coursework support https://courseworkdomau.com/</strong>
ourtime login uk
2023-02-08 13:53:35
<strong>best singles website https://jewish-dating-online.net/</strong>
dating sites free chatting
2023-02-08 15:13:14
<strong>dating singles https://jewish-dating-online.net/</strong>
top dating sites
2023-02-08 16:16:56
<strong>american singles https://free-dating-sites-free-personals.com/</strong>
free online dating sites
2023-02-08 17:25:34
<strong>dating sites adult https://sexanddatingonline.com/</strong>
dating chat site
2023-02-08 19:12:11
<strong>mature nl lesbian https://onlinedatingsurvey.com/</strong>
mingle2
2023-02-08 20:07:16
<strong>dating sites free chatting https://onlinedatingsuccessguide.com/</strong>
chat singles
2023-02-08 20:59:19
<strong>no credit card dating sites https://onlinedatinghunks.com/</strong>
dating sex
2023-02-08 22:12:52
<strong>senior dating https://datingwebsiteshopper.com/</strong>
dating team
2023-02-09 02:11:41
<strong>singles to meet https://freewebdating.net/</strong>
Яндекс.Метрика