Showing posts with label Webmin. Show all posts
Showing posts with label Webmin. Show all posts

Wednesday, July 20, 2016

Mengakses webmin dengan IP langsung

Mengakses webmin bisa dilakukan dengan IP langsung
misal : https://128.312.233.22:10000

Monday, December 7, 2015

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server.

https://www.virtualmin.com/node/14602



  • decay
  •  06/07/10
  • Offline
Posted: Wed, 2010-06-09 06:48
Hmm, sorry for creating another thread, but thought this deserves its own thread. This question was asked few times in this forum, but i was unable to find a clear answer that i would follow. So it would be awesome if someone can give me a quick fix for this (would help everyone else too)...
Any way, i was trying to run "Re-Check Config" under "System Settings" and i get the following:
Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.
 
.. your system is not ready for use by Virtualmin.
any idea how to Fix this?
Im running CentOS 5.5 on a VPS hosted by volume drive (if that helps).
Just to add, im really noob, so it would be greatly appreciated if you can explain a tiny bit in detail what i can/should do... :)
Thanks in advance.

just to add, i can simply

  • decay
  •  06/07/10
  • Offline
  •  Wed, 2010-06-09 06:56
just to add,
i can simply add 127.0.0.1 to the list of DNS servers (this fixes the problem)... but sadly, when ever i restart my vps, the list of dns servers resets back to default and i get this same error again... so i guess every time i restart my server i can remember to add this again, but is there any way to fix this (or prevent this from happening)? O.o

Chances are that's happening

  • andreychek
  •  01/04/09
  • Online Now
  •  Wed, 2010-06-09 09:08
Chances are that's happening due to your IP address being obtained by DHCP. By default, the DHCP client will set a number of things, including the DNS servers.
To prevent that, edit /etc/dhclient-eth0.conf , and make sure there is a line like :
prepend domain-name-servers 127.0.0.1;

In CentOS 7, the file will be

  • Changos
  •  11/16/15
  • Offline
  •  Mon, 2015-11-16 17:19
In CentOS 7, the file will be along the lines of '/etc/dhcp3/dhclient.conf'. Ensure you carry out a restart of the service (service named restart) or reboot the system.
Just add the line as Eric stated.
prepend domain-name-servers 127.0.0.1;
Thanks.


https://www.virtualmin.com/node/14602

Using SSL with Webmin

http://www.webmin.com/ssl.html

Because your Webmin login and password are normally passed between your browser and the server in unencrypted form, an attacker with access to any of the networks between the browser and server can easily capture your Webmin login. To prevent this, Webmin can be configured to use SSL to encrypt all of its network traffic.
Last updated:
Sunday, 06-Dec-2015 17:55:49 UTC

Running Webmin in SSL mode

To install SSL, follow these steps :
  1. Download the OpenSSL library
    OpenSSL is a C library that provides the underlying SSL functions used by Webmin and many other programs. It is available in RPM format and as a .tar.gz file. When installing from the RPM, you may also need thedevelopment RPM in order to compile Net::SSLeay. 
    Most Linux and BSD distributions now come with OpenSSL RPMs that are installed as standard or available on the CD. If your distribution has openssl and possibily openssl-devel packages, use them instead.
  2. Install the OpenSSL library
    If you are installing from the RPM, run the commands :
      rpm -i openssl-0.x.y.rpm
      rpm -i openssl-devel-0.x.y.rpm
    If installing from the source, you will need to compile and install it with the commands :
      tar xvzf openssl-0.x.y.tar.gz
      cd openssl-0.x.y
      ./Configure     (or ./config in new OpenSSL versions)
      make
      make install
  3. Download the Net::SSLeay Perl module
    Net::SSLeay is a module that allows Perl scripts to call the functions in the OpenSSL library. It is available in .tar.gz format from the Webmin site or from the CPAN Perl module archive
    Alternately, you can use the Perl Modules module in Webmin to download an install Net::SSLeay from CPAN. If this works OK, the next step can be skipped. 
    Some Linux distributions come with an RPM package containing this Perl module, often named perl-Net-SSLeay. If one is available, install it instead of compiling the module manually. You may also be able to find a suitable package at rpmfind.net if your distribution doesn't include one. However, be aware that any Perl module in RPM format must have been built for the same version of Perl that you are running, or it won't work.
  4. Install the Net::SSLeay module
    To install the module, use the commands :
      tar xvzf Net_SSLeay.pm-x.yy.tar.gz
      cd Net_SSLeay.pm-x.yy
      perl Makefile.PL
      make install

    If you have installed OpenSSL from the RPM, you may need to run perl Makefile.PL /usr in order to find the OpenSSL library properly.
  5. Test the SSL install
    If the command perl -e 'use Net::SSLeay' doesn't output any error message, then the SSL support that Webmin needs is properly installed.
  6. If Webmin is not installed yet, install it
    If you install SSL support first, when Webmin's setup.shscript is run it will ask you if you want to enable SSL. Just enter y. The RPM version of Webmin will always automaticlly use SSL mode if possible.
  7. If Webmin is already installed, turn on SSL
    In the Webmin Configuration module (under the Webmin category) an icon for SSL Encryption should appear. Click on it, and change the SSL option fromDisabled to Enabled.
Warning - if you enable SSL support in Webmin, your browser must also support SSL (such as Netscape and IE). If not, you will not be able to access the Webmin server. If there is a firewall or proxy between the machine you are running your browser on and the Webmin server, check that it allows SSL requests to pass through as well.

Using STunnel to protect Webmin

Because many people have trouble installing OpenSSL and the Net::SSLeay module needed to run Webmin in SSL mode natively, I have created documentation explaining an alterative method. The STunnel program can convert SSL-encrypt any network services, such as POP3 or IMAP - or even Webmin. However, only Webmin versions 1.090 and above will work fully. To set it up, follow these steps :
  • Install STunnel
    The program is installed as standard with many Linux distributions, or can be downloaded fromwww.stunnel.org and compiled for your system.
  • Create a new tunnel
    Use Webmin's SSL Tunnels module to create a new tunnel on port 10001 called ssl-webmin that uses theConnect to remote host mode to connects tolocalhost port 10000 (assuming you are running Webmin on port 10000).
    The SSL certificate and key file option should be set toUse Webmin's cert, and all of the other options left as their defaults.
  • Activate the tunnel
    Hit the Apply Changes button in the SSL Tunnels module to activate your new tunnel.
  • Configure Webmin so that it knows about the SSL tunnel
    Added the line inetd_ssl=1 to/etc/webmin/miniserv.conf and run /etc/webmin/stop ; /etc/webmin/start.
  • Login to Webmin in SSL mode
    You should now be able to connect to https://yourhostname:10001/ and login as normal. The old URL on port 10000 will no longer work properly.

http://www.webmin.com/ssl.html

Sunday, December 6, 2015

Install and Setup SSL in Webmin and Apache

https://www.ma-no.org/en/content/index_install-and-setup-ssl-in-webmin-and-apache_1284.php


SSL is a protocol for making secure, authenticated connections across an insecure network like the Internet. It encrypts network traffic, so that an attacker cannot listen in on the network and capture sensitive information such as passwords and credit card numbers. It allows servers to authenticate themselves to clients, so that a web browser can be sure that it is connecting to the website that is thinks it is. It also allows clients to authenticate themselves to servers, which can be used to replace usernames and passwords with digital certificates.
The SSL protocol can be used to encrypt any kind of data that would normally travel over an unencrypted TCP connection. However, in this chapter we are only concerned with the encryption of web page requests and responses, which is done by encrypting HTTP protocol data with SSL. The result is a new protocol called HTTPS, which is used by all websites that want to operate securely. Almost every browser supports the HTTPS protocol, and uses it when retrieving URLs that start withhttps:// instead of the normal http://. Whereas the normal HTTP protocol use TCP port 80, the HTTPS protocol uses port 443.
You can configure Apache to use HTTPS on a per-virtual server basis, or to use it for all servers. However, this depends on having the mod_ssl Apache module compiled in or available for dynamic loading, which is not always the case. The *Configuring Apache as a proxy server* section explains how to check for and possibly enable the mod_proxy module, and you can follow those same instructions for mod_ssl as well. Most modern Linux distributions include SSL support in their Apache package as standard though.
At the heart of the SSL protocol are digital certificates, which are used for both authentication and encryption. Typically the server sends its certificate to the client to prove its identity, so that the client knows that its connection to the website has not been re-directed by an attacker. Certificates issued by a proper certificate authority such as Verisign or Thawte are impossible for forge, because they have been signed by the authority's master certificate. All web browsers include a list of authorities that they can use to validate signatures and thus ensure the authenticity of web site certificates.
The down side of this method of certificate validation is that you cannot simply generate your own certificate for your website that will be accepted without complaint by web browsers. It is possible to create a self-signed certificate that Apache will happily use, but any browser connecting to that webserver in SSL mode will display a warning message to the user because the certificate is not signed by a recognized authority. Self-signed certificates are fine for encrypting HTTPS traffic, but if you want browsers to be able to validate your site you will need a 'real' certificate signed by a proper authority - and that costs money.
Before you can enable SSL in Apache, you must have a certificate. The easiest way to get one for testing purposes is to generate your own self-signed certificate, which can be done by following the steps below. To generate a real certificate from a recognized authority, follow the steps at the end of this section instead. To create a certificate, you will need the openssl command, which is included with most modern Linux distributions and freely available for download fromhttp://www.openssl.org/. If Apache on your system already includes the mod_ssl module, then openssl is probably already installed or on your distribution CD or website.

  1. Login to your system as root.
  2. Change to the directory in which you want to store your certificate files, such as /usr/local/apache/conf or /etc/httpd.
  3. Run the command
    openssl req -newkey rsa:512 -x509 -nodes -out cert.pem - keyout key.pem
  4. The command will ask the following question, in order to obtain attributes for your new key. To leave any of the requested fields blank, just enter a single period. 
    - Country name (The two-letter code for the country your webserver is in, such as AU or US. )
    - State or Province Name (The name of the state your server is in, such as California. )
    - Locality Name (The city your server is in, such as San Francisco. )
    - Organization Name (The name of your company or organization, such as Example Corporation. )
    - Organizational Unit Name (The name of your division within the company, such as Engineering.
    - Common Name(The hostname of your webserver as used in the URL. For example, if browsers usually access the server as http://www.example.com/, then you should enter www.example.com for this question. Unfortunately you can only enter a single hostname, so if your webserver is accessed by more than one name, such as www.example.com and example.com, then only one will match the certificate. However, the hostname can contain the wildcard character *, so you can enter .example.com or even just *. )
    - Email Address (The email address of the administrator for this webserver, such as jcameron@example.com.)
  5. When all the questions have been answered, the files cert.pem and key.pem will be created in the current directory. These are your website's certificate and its private key respectively.
  6. Because the private key must be kept secure to ensure the security of SSL connections to your server, change its ownership to the user that Apache runs as, with a command like chown httpd key.pem. Then set the permissions so that no other user can read it, with the command chmod 600 key.pem.

How that a certificate and private key have been created, you are ready to configure your web server to use SSL. The best way to do this is to create a new virtual server that handles all requests to port 443 (the HTTPS port) in SSL mode. This way any existing virtual servers on your system will not be effected. The exact steps to follow are :

  1. On the main page of the Apache Webserver module, click on the Networking and Addresses icon.
  2. In the blank row at the end of the Listen on addresses and ports table, select All under the Address column and enter 443 under the Port column. Then click the Save button at the bottom of the page.
  3. Back on the main page, scroll down to the Create a New Virtual Server form.
  4. Set the Address field to Any, and the Port field to 443.
  5. If you want the pages that browsers see when connecting in SSL mode to be the same as those that they see when making a normal HTTP connection, enter the document root directory for your default server into the Document Root field. Otherwise, you can enter a different directory so that clients will see different pages when making HTTPS requests.
  6. In the Server Name field, enter the same hostname that you specified for the Common Name when creating the SSL certificate.
  7. Click the Create button to have the new virtual server added to your Apache configuration. An icon for it will be added to the module's main page.
  8. Click on the icon for your new server to go to the virtual server options page. An icon labelled SSL Options should be visible - if not, either your Apache webserver does not have the mod_ssl module, or Webmin hasn't detected it yet.
  9. Click on the SSL Options icon to bring up the page shown in the screenshot below.
  10. Change the Enable SSL? field to Yes. This tells Apache that the virtual server should treat all connections as HTTPS.
  11. In the Certificate/private key file field, de-select Default and enter the full path to the cert.pem file that you created earlier.
  12. In the Private key file field, enter the full path to the key.pem file. If you only have a single file that contains both the certificate and private key, you can leave this field set toDefault and enter its path into the field above.
  13. Click the Save button, and then the Apply Changes link back on the virtual server options page.
  14. Unless an error is reported when applying the configuration, your webserver should now be running in SSL mode on port 443. Test it out by using a web browser to go tohttps://www.example.com/ or whatever the URL of your site is. Note that there is no need to specify port 443 in the URL, as it is used by default for HTTPS, just like port 80 is the default for HTTP.

The SSL Options page
It is also possible to create IP-based virtual servers that use SSL and handle connections to port 443 on particular IP addresses. However, it is not possible to create several name-based virtual servers that use SSL, because the server sends its certificate to the client before any HTTP protocol data is exchanged. Normally the Host: HTTP header is used by Apache to determine which name-based virtual server a request is being made to, but this header has not been send by the browser at the time the webserver selects the certificate to send to the client. The end result is that having multiple named-based virtual servers on the same IP address in SSL mode will not work properly, if at all.
On some Linux distributions, the included Apache package may already include an example virtual server running on port 443 with SSL enabled. It will probably also come with usable certificate and private key files, although they are likely to be self-signed and to have a different hostname for the common name. In this case, there is no need to follow the steps above to set it up - all you need to do is generate your own SSL certificate files, and then visit the SSL Options page in the existing virtual server to change the Certificate/private key file and Private key file fields.
If you want to use Apache to host a real Internet website running in SSL mode, you will need to request a certificate signed by a recognized authority. To do this, you must generate a CSR (certificate signing request) and send it to the authority for verification along with your website's name, company name and other details to prove that you really do own the website and domain. After they have verified your details, the CA will sign the certificate and send it back to you for use in your webserver.
The exact steps to follow for generating a CSR are :
  1. Login to your system as root.
  2. Change to the directory in which you want to store your certificate files, such as /usr/local/apache/conf or /etc/httpd.
  3. Run the command
    openssl genrsa -out key.pem 1024.
    This will create just the private key file key.pem.
  4. Make sure that the file can only be read by the webserver user, with commands like chown httpd key.pem and chmod 600 key.pem.
  5. Run the command
    openssl req -new -key key.pem -out csr.pem
    to generate the CSR.
  6. The command will ask the following question, in order to obtain attributes for your new key. To leave any of the requested fields blank, just enter a single period.
    • Country name (The two-letter code for the country your webserver is in, such as AU or US. )
    • State or Province Name (The name of the state your server is in, such as California.)
    • Locality Name (The city your server is in, such as San Francisco.)
    • Organization Name (The name of your company or organization, such as Example Corporation.)
    • Organizational Unit Name (The name of your division within the company, such as Engineering.)
    • Common Name (The hostname of your webserver as used in the URL. For example, if browsers usually access the server as http://www.example.com/, then you should enter www.example.com for this question. Wildcards cannot generally be used in the hostname of certificates signed by CAs. )
    • Email Address (The email address of the administrator for this webserver, such as jtest@example.com.)
  7. When all the questions have been answered, the file csr.pem will be created in the current directory. This is your certificate signing request, which should be sent to the certificate authority for signing.
  8. After your details have been verified and your money taken, the authority will send you back a signed certificate. It should be a text file that starts with the line -----BEGIN CERTIFICATE-----. Put it in the same directory as the private key, in a file named cert.pem.

If you have over-written existing self-signed private key and certificate files, it is best to stop and re-start Apache to force the new ones to be used. You should now be able to connect to your webserver in SSL mode with no warning displayed in the browser.


https://www.ma-no.org/en/content/index_install-and-setup-ssl-in-webmin-and-apache_1284.php

Monday, November 16, 2015

How to View PHP Information on Webmin Virtualmin

While some Web servers are managed locally on site for all changes, most are managed remotely at least some of the time. Webmin is a software suite commonly used for connecting to Unix-style systems remotely, allowing you full control as if you were at the server directly. If you have PHP running on your server, you will likely need to check the configuration settings by pulling the "phpinfo" file. This can be done easily from Webmin with just a few commands.

  • Log into the Webmin tool for your Web hosting.
  • Click "Running Processes" within the Webmin interface.
  • Click "Run..." and type "php -i" into the prompt that pops up.
  • Click the "Run" button. The phpinfo() command will be run, and your PHP configuration settings will be displayed.


Read more : http://www.ehow.com/how_8745930_php-information-webmin.html
How to View PHP Information on Webmin

Read more : http://www.ehow.com/how_8745930_php-information-webmin.html