How to Setup Webmin 1.620 using YUM repository on CentOS 6.4

http://www.howtolinux247.info/2013/06/how-to-setup-webmin-1620-using-yum.html

 

This post will brief you on how to setup Webmin 1.620 using yum repository in CentOS 6.4 virtual private server (VPS). Webmin is an open source system administration and system configuration tool which provide you web-based interface to manage, administer and configure your CentOS VPS or dedicated server through web browser. It’s provide graphical interface remote administration instead of manually edit the configuration using command line from putty or console. 1. Enabling Yum repository for Webmin. Create the /etc/yum.repos.d/webmin.repo file containing :

[root@centos64 ~]# vi /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

2. Fetch and install my GPG key :

[root@centos64 ~]# wget http://www.webmin.com/jcameron-key.asc
[root@centos64 ~]# rpm --import jcameron-key.asc

3. Run “yum install” command to install all required dependencies :

[root@centos64 ~]# yum install webmin -y

Example :

[root@centos64 ~]# yum install webmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package webmin.noarch 0:1.620-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                   Version                 Repository              Size
====================================================================================================
Installing:
 webmin                 noarch                 1.620-1                 Webmin                  21 M

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 21 M
Installed size: 21 M
Downloading Packages:
webmin-1.620-1.noarch.rpm                                                    |  21 MB     04:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : webmin-1.620-1.noarch                                                            1/1
Operating system is CentOS Linux
Webmin install complete. You can now login to http://centos64.ehowstuff.local:10000/
as root with your root password.
  Verifying  : webmin-1.620-1.noarch                                                            1/1

Installed:
  webmin.noarch 0:1.620-1

Complete!

4. By default Webmin runs on port 10000, therefore port 10000 need to be open in order to allow you to access web base interface remotely.

[root@centos64 ~]# vi /etc/sysconfig/iptables

Add the following rule to existing iptables firewall :

-A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT

Restart IPtables :

[root@centos64 ~]# service iptables restart

5. Access and login to Webmin using URL http://serveripaddress:10000/

How to Configure Static IP Address on CentOS 6.3 Linux Host

This post shows the steps to configure static ip address, default gateway, netmask, dns server and make a network auto start at boot on linux CentOS 6.3 host normally configured with static ip address, so that easier to maintain the configuration on it’s client and DNS server will always able to resolve it.

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="xx:xx:xx:xx:xx:xx"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"

1. Configure eth0:

[root@centos ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="xx:xx:xx:xx:xx:xx"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.3.3
NETMASK=255.255.255.0

2. Configure Default gateway:

[root@centos ~]# nano /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos.somedomain.local
GATEWAY=192.168.13.1

4. Configure DNS server :

[root@centos ~]# nano /etc/resolv.conf
nameserver 8.8.8.8

Tip, If after a reboot the interface is still not working, you may need to delete the 70-persistent-net.rules file from /etc/udev/rules.d

Manually configuring network card in Ubuntu Server

This is a common problem also when a Vmware machine is moved to another server.
It is beacause the new card has a different MAC address.

Unlike Ubuntu Desktop, the server version is desgned NOT to make an assumption of how the card is configured – just in case it gets it wrong & places vulnerable data outside a firewall on the Internet.

You can enable the card easliy by deleting a file:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Then reboot.

This file is recreated with the new card MAC address upon reboot.

Then check your settings.

 

EDIT****

This also applies to CentOS 6.x

25 Most Frequently Used Linux IPTables Rules Examples

25 Most Frequently Used Linux IPTables Rules Examples.

 

At a first glance, IPTables rules might look cryptic.

In this article, I’ve given 25 practical IPTables rules that you can copy/paste and use it for your needs.

These examples will act as a basic templates for you to tweak these rules to suite your specific requirement.

For easy reference, all these 25 iptables rules are in shell script format: iptables-rules