Download Webmin 1.955
Installing on Windows
Recent Webmin versions can be installed and run on Windows, although with limited functionality as not all the servers that Webmin configures (such as Samba, Sendmail and so on) are available. The steps to install on Windows from the source code are :
- Install winzip or pkunzip so that you can extract the .zip file linked to above.
- Install the latest versions of ActiveState Perl for Windows. Note that currently, only the 32-bit version works.
- Install the process.exe program, a command-line tool for listing and killing Windows processes.
- Verify that sc.exe is installed. This is part of Windows XP, and may be found in the Windows Resource Kit on other versions of the OS.
- Install the Win32::Daemon Perl module. This can be done with the command ppm install Win32-Daemon .
- Create the c:\temp directory if it doesn’t already exist.
- After extracting the Webmin ZIP file to c:\webmin , open a command shell window, cd to that directory and run perl setup.pl.
- Answer all the questions as you would for a tar.gz install of Webmin, as documented on this page.
- Login to Webmin, go to Webmin -> Webmin Configuration -> Webmin Modules, and install the optional MSI software discovery module. This allows the Software Packages module to list all installed software.
Windows Installer
Philipp Gьhring has created a proper installer for Webmin on Windows, available from WebminInstall.exe. It requires that you install ActiveState Perl first, but is far simpler to install as it is packaged as a single .exe file.
The source code for the installer is available in WebminInstaller.zip.
© 2006-2016 Webmin | Design by: styleshout Home |
Установка и защита Webmin на веб-сервере Centos 7
Администрирование серверов Linux может быть очень скучным, набирая команды в терминале. Но наличие инструментов, которые автоматизируют длинные команды и добавят немного графики. Всегда хорошо, а также это может произвести впечатление на вашего босса.
Такие инструменты, как Webmin и PhpMyAdmin, всегда хорошо иметь под рукой. Однако они приносят с собой проблемы безопасности из-за различных уязвимостей. Ну например порты и пути указанные при установки. Это первое что будут сканировать злоумышленники.
В этом уроке я покажу как установить Webmin на сервер Centos 7. И в место того, чтобы открыть стандартный порт 10000 для доступа к нему из внешнего мира.Буду получать доступ к нему через SSH-туннель с нашей машины windows, не открывая никаких дополнительных портов .
Эта статья для Centos 7, работающем на сервере VPS. Однако описанные методы могут быть использованы практически на любом сервере Linux. Так же в этом руководстве предполагается, что у вас есть корневой доступ к серверу. Это очень важно!
Установка Webmin:
Мы начинаем с добавления репозитория Webmin в yum, которое не входит в стандартную комплектацию.
Вставьте следующее:
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
Установите ключ GPG
#rpm —импорт http://www.webmin.com/jcameron-key.asc
Далее нам потребуется обновить репозитории
Устанавливаем Webmin
Resolving Dependencies
—> Running transaction check
—> Package webmin.noarch 0:1.831-1 will be installed
—> Processing Dependency: perl(Net::SSLeay) for package: webmin-1.831-1.noarch
—> Running transaction check
—> Package perl-Net-SSLeay.x86_64 0:1.55-4.el7 will be installed
—> Finished Dependency Resolution
Dependencies Resolved
==========================================================
==========================================================
webmin noarch 1.831-1 Webmin 27 M
Installing for dependencies:
perl-Net-SSLeay x86_64 1.55-4.el7 base 285 k
Transaction Summary
=========================================================
Total download size: 27 M
Installed size: 76 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): perl-Net-SSLeay-1.55-4.el7.x86_64.rpm | 285 kB 00:00:00
(2/2): webmin-1.831-1.noarch.rpm | 27 MB 00:00:21
———————————————————
Total 1.2 MB/s | 27 MB 00:00:21
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Net-SSLeay-1.55-4.el7.x86_64 1/2
Operating system is CentOS Linux
Installing : webmin-1.831-1.noarch 2/2
Webmin install complete. You can now login to https://yourserver.com:10000/
as root with your root password.
Verifying : webmin-1.831-1.noarch 1/2
Verifying : perl-Net-SSLeay-1.55-4.el7.x86_64 2/2
Installed:
webmin.noarch 0:1.831-1
Dependency Installed:
perl-Net-SSLeay.x86_64 0:1.55-4.el7
Запуск Webmin:
Далее включим Webmin запустив сервис:
Примечание: поскольку webmin не считается родным сервисом, мы используем chkconfig webmin on вместо обычного systemctl enable webmin чтобы включить webmin при запуске. Мы также запускаем сервис с помощью /etc/init.d/webmin start хотя можно и так.. systemctl start webmin
#chkconfig webmin on
#/etc/init.d/webmin start
Теперь Webmin работает и запускается автоматически при следующей загрузке сервера. Теперь нам нужно сделать его доступным для внешнего мира.
Примечание: Если вы не хотите, чтобы webmin запускался автоматически при каждой загрузке, не выполняйте команду chkconfig webmin on. Чтобы запустить и остановить службу вручную, вы можете запустить “/etc/init.d/webmin start” и “/etc/init.d/webmin stop”
Доступ к Webmin напрямую из внешнего мира (не рекомендуется):
Если вы хотите получить доступ к Webmin из любого браузера подключенного, то все что вам нужно сделать: это открыть порт 10000 для внешнего мира
#firewall-cmd —zone=external —add-port=10000/tcp —permanent
Как я уже писал ранее, это не безопасно и не рекомендуется. Имейте в виду, что порт 10000 является одним из первых портов, которые будут сканироваться во время сканирования порта. Злоумышленники найдя открытый порт 10000 будут на один шаг ближе к взлому вашего сервера . Используйте другой порт, отличный от стандартного 10000. Убедитесь, что вы используете надежные пароли и ограничьте доступ к наименьшему числу пользователей ( конечно же, не root). Кроме того, убедитесь, что вы всегда используете https-соединения, особенно если вам нужно получить доступ к серверу из общественного места с помощью неизвестного сервиса Wi-Fi.
Безопасный доступ к webmin (правильный способ):
Рекомендуемый способ безопасного доступа к webmin (или любой другой службе на вашем сервере) заключается в том, чтоб оставить порт 10000 закрытым. Будем поучать доступ к webmin через ssh-туннель. Это гораздо безопаснее.
Вот как это делается :
- Вам надо скачать putty-a free ssh и telnet client для windows.
- Устанавливаем и запускаем.
- В поле Имя хоста (или IP address) введите имя хоста или ip-адрес вашего сервера
- В поле Порт введите SSH port, который используется для подключения к серверу
- Тип подключения: SSH
- В Saved Sessions введите имя, чтобы сохранить настройки, которые вы делаете, я использую имя хоста.
- Далее, в разделе категория, нажмите на знак + рядом с «SSH«, в разделе «соединение» и выберите » туннели“
- В исходном порту проставляется 10000
- В пункт назначения положить 127.0.0.1: 10000
Установка защита Webmin Centos server
- Нажмите кнопку Add, и вы увидите строку L10000127.0.0.1: 10000, добавленную в разделе перенаправленные порты
Установка защита Webmin Centos server
» data-medium-file=»https://setiwik.ru/wp-content/uploads/2020/04/1-Установка-защита-Webmin-Centos.jpg» data-large-file=»https://setiwik.ru/wp-content/uploads/2020/04/1-Установка-защита-Webmin-Centos.jpg» title=»Установка защита Webmin Centos server» svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20300%20290%22%3E%3C/svg%3E’ data-src=»https://setiwik.ru/wp-content/uploads/2020/04/1-%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0-%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%B0-Webmin-Centos.jpg» alt=»Установка защита Webmin Centos server» width=»300″ height=»290″ data-srcset=»https://setiwik.ru/wp-content/uploads/2020/04/1-Установка-защита-Webmin-Centos.jpg 300w, https://setiwik.ru/wp-content/uploads/2020/04/1-Установка-защита-Webmin-Centos-45×45.jpg 45w» data-sizes=»(max-width: 300px) 100vw, 300px»/> Установка защита Webmin Centos server
- Используйте прокрутку, чтобы прокрутить назад, и нажмите на Session еще раз, а затем нажмите кнопку “SAVE”. Вы должны увидеть свои сохраненные настройки в «Saved Sessions”
Установка защита Webmin Centos server
» data-medium-file=»https://setiwik.ru/wp-content/uploads/2020/04/3-Установка-защита-Webmin-Centos.jpg» data-large-file=»https://setiwik.ru/wp-content/uploads/2020/04/3-Установка-защита-Webmin-Centos.jpg» svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20300%20291%22%3E%3C/svg%3E’ data-src=»https://setiwik.ru/wp-content/uploads/2020/04/3-%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0-%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%B0-Webmin-Centos.jpg» alt=»Установка защита Webmin Centos server» width=»300″ height=»291″ data-srcset=»https://setiwik.ru/wp-content/uploads/2020/04/3-Установка-защита-Webmin-Centos.jpg 300w, https://setiwik.ru/wp-content/uploads/2020/04/3-Установка-защита-Webmin-Centos-45×45.jpg 45w» data-sizes=»(max-width: 300px) 100vw, 300px»/> Установка защита Webmin Centos server
Проверим наше соединение. Нажимаем кнопку “Open” , если имя хоста и порт верны, вы должны быть встречены на заднем экране с подсказкой ” войти как:»:
Введите свое имя пользователя и нажмите кнопку “enter”
Вам будет предложено ввести пароль. Введите его, снова нажмите ” enter «, и если все идет хорошо, вы увидите $ или # prompt вашего сервера. Уже почти готово.
Запустите ваш любимый браузер перейдите на https://127.0.0.1:10000, ошибку конфиденциальности надо игнорировать. Вы увидите экран входа webmin
Установка защита Webmin Centos server
» data-medium-file=»https://setiwik.ru/wp-content/uploads/2020/04/4-Установка-защита-Webmin-Centos.jpg» data-large-file=»https://setiwik.ru/wp-content/uploads/2020/04/4-Установка-защита-Webmin-Centos.jpg» svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20300%20267%22%3E%3C/svg%3E’ data-src=»https://setiwik.ru/wp-content/uploads/2020/04/4-%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0-%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%B0-Webmin-Centos.jpg» alt=»Установка защита Webmin Centos server» width=»300″ height=»267″/> Установка защита Webmin Centos server
Примечание : Если вы хотите получить доступ к webmin через http, и избежать предупреждений безопасности. Требуется изменить /etc/webmin/miniserv.conf на сервере. Измените строку ssl=1 на ssl=0. Это не будет иметь никакого влияния на безопасность, так как м получаем безопасный доступ к нашему серверу через ssh-туннель.
Заключение:
Если есть другие установленные сервисы, которые обычно требуют, открытия новые портов. Добавьте правила пересылки в putty под ssh->tunnels и сохраните свой сеанс. При использовании этого метода вы открываете только 3 порта. Это порты 80, 433 для http и https-трафика и еще один порт для ssh-соединений. Рекомендую порт ssh открыть не 22 а какой нибудь рандомный.
Доступ к Webmin мы получаем до тех пор пока работает putty ssh. После выхода из системы службы станут недоступными. В следующий раз, когда вам нужно будет получить доступ к услугам через ssh-tunnel, просто запустите putty, выберите “Saved Session”, нажмите кнопку “ Load”, а затем кнопку “ Open”, введите имя пользователя и пароль.
Ну вот в принципе и все, если есть вопросы или вы нашли неточности в статье, оставьте комментарий. Или создайте тему на Форуме.
Installing Webmin on Windows
What you need to have installed before you can run Webmin on Windows.
Содержание
Requirements and Optional Programs
- ActiveState Perl 5.8.8 or earlier (required) 5.10 or newer will not work. (Ed note: This has to be wrong. 5.10 is the current minimum version targeted by Webmin. This needs an explanation if it really needs an ancient version of Perl.)
- Cygwin (required) >>> GnuWin32 is broken DO NOT USE
- Process.exe (required)
- Win32::Daemon Perl module (required)
- Verify that sc.exe is installed. This is part of Windows XP, and may be found in the Windows Resource Kit on other versions of the OS. (required)
- Apache for windows
- Bind for windows
- MySQL for windows
- LDAP for windows
- PostgreSQL for windows
- OpenSSH for windows
- PHP for windows
- Python for windows
- Sendmail for windows
First install ActiveState Perl then follow below.
Install Win32::Daemon
Using ActiveState Perl type:
From the command prompt.
Install Net::SSLeay on WinXP
This is required for HTTPS connections.
Using ActiveState Perl type:
From the command prompt.
Download OpenLDAP for Windows
This includes OpenSSL so if you don’t need LDAP then use the GnuWin32 OpenSSL
For the Windows platform, ILEX has created this OpenLDAP for Windows distribution. It’s a packaged version using Nullsoft NSIS and includes OpenLDAP, SASL, BDB, and OpenSSL. It supports LDAP, LDAPS and LDAP+TLS. The wizard guides you through the installation and permit the creation of the slapd.conf file, the database root, the certificates generation (CA+server), the system service installation and much more.
Note: | OpenLDAP can also be installed under Cygwin if you don’t want to install this version. Read the HOWTO for this. |
Installing OpenSSL
OpenSSL is installed with GnuWin32
Setting up the Windows Environment Variables
You need to edit your windows environment — THIS IS VERY IMPORTANT .
- Click on My Computer from the desktop and choose Properties
- Click on the Advanced tab
- At the bottom click on Environment Variables
- Make sure the Path variable has the following:
Software Links
Sendmail port by Micro$oft
- This is a OLD sendmail version BUT if you are only sending mail then all you need to do is exec the binary file with the normal sendmail switches. The binaries are located under the msport/sendmail.8.6.9.nt/src/ directory.
- [sendmail 8.6.9]
CygWin also has the native port of sendmail which is usually the most recent version.
Other HOWTO docs
Extra PPM repos
Type ppm-shell from the command prompt then add the following repos.
Known Issues
- Updating modules does not work. You will need to manually install any updated modules.
- Updating webmin does not work from the webmin configuration section
- DIFF utilities in the GnuWin32 is broken and logging changes for rollback will not work.
- Logging is not recommended at all on the windows platform.
- Installing as a Windows Service does not always work. I use FireDaemon to start/stop webmin instead.
- Creating self-signed SSL certs does not work. You will need to create them on a linux box and import them into webmin for SSL.
Manual install of modules
You will need to download the module and use winzip or any other tool to untar/unzip the module then once you have the module directory paste it into the MAIN directory where webmin is installed. In my case I installed webmin under c:/webmin
RPC calls
Windows firewall blocks almost everything so RPC calls will fail. To fix this open 10+ ports from the start of where you told webmin to listen on. EG; https://localhost:10100 so open TCP ports from 10100-10111 — if you used 10000 then open 10000-10011
Final note
You may need to reboot your win box after updating any Windows Environment Variables.