Tag Archives: technology

Time synchronization on CentOS 6.2 using NTP

To install the ntp, just enter this command at the terminal:

sudo yum install ntp

To make the ntpd start at boot time, use this commands:

sudo chkconfig ntpd on

After installation, edit the default ntp configuration:

sudo nano  /etc/ntp.conf

Commented out/remove the default CentOS servers,you can add your own time-servers here to synchronize with, http://www.pool.ntp.org/zone/europe or http://www.pool.ntp.org/zone/north-america lists:

After you are done with the configuration, just start the ntp service:

sudo service ntpd start

To check if the NTP service is synchronizing:

sudo ntpq -pn

To check the synchronization log:

sudo tail -f /var/log/messages

Geeky Comparison with Windows clock after synchronization:

Hope this will help you!

Please Remember me in your prayers!

Mikrotik as Gateway

Note: This is not the best tutorial on Mikrotik, but it is one of easiest tutorial to configure Mikrotik as gateway 🙂

Scenario:

In this scenario, Mikrotik will work as dhcp, dns, and default gateway for local network.

Local Network : 172.16.10.0/24

Public: 192.168.1.0/24 (In this scenario)

I assume that you already install the fresh copy of mikrotik  on any low end (P III, P IV or whatever) machine. Default username is “admin” and there is no password , by default.

Login to the Mikrotik router:

After login, you will see the screen something like this:

After login, first thing we need to do is to change password:

password

Check the interface(s) Setting by using this command:

interface print

Change the interface(s )name by using these commands:

interface set 0 name=WAN
interface set 1 name=LAN

Now, check the interface(s) again:

interface print

Assign the ip address to LAN interface:

ip address add address=172.16.10.1/24 interface=LAN

Assign the ip address to WAN interface:

ip address add address=192.168.1.169/24 interface=WAN

Now, check the ip address setting:

ip address print

Add the default route using this command:

ip route add gateway=192.168.1.1

Check the routing table:

ip route print

DNS setup on Mikrotik:

ip dns set primary-dns=8.8.8.8 secondary-dns=4.2.2.2
ip dns set allow-remote-requests=yes 

DNS settings check:

ip dns print

DHCP Configuration:

ip dhcp-server setup

Configuration of NAT on Mikrotik:

ip firewall nat add chain=srcnat action=masquerade out-interface=WAN

Testing from one of the Local Network’s Client:

Hope this will help you!

Please Remember me in your prayers!

How to Enable Telnet Client on Windows 7

Telnet Client allows a computer to connect to a remote Telnet server and run applications on that server. Once logged on, a user is given a command prompt that can be used as if it had been opened locally on the Telnet server’s console. Commands that you type at the Telnet client command prompt are sent to the Telnet Server and executed there, as though you were locally logged on to a command prompt session at the server. Output from the commands that you run are sent back to the Telnet client where they are displayed for you to view.

When you first try to run a telnet command, Windows will informs you that telnet is not recognized as a command:

To enable Telnet Client on Windows 7, just follow these simple steps :

To confirm that Telnet  Client is installed Successfully: 

Real Life Test: I will connect to my DSL Modem to confirm that it is working properly!

Hope this will help you!

Please Remember me in your prayers!

Disable “This program might not have installed correctly” Message in Windows 7

If you are the type of person who installs a lot of software on your PC, then you may have seen the following message after successful installations:

Most of the time, the program I am installing,installs fine and this message is an inconvenience. In a quest to click my mouse less, I set out to disable this dialog box. Learn how to disable this also in this guide.

Disable “This program might not have installed correctly” Message

To disable the This program might not have installed correctly message:

1. Click the Start button, type services.msc, and press Enter:

2. Scroll down to Program Compatibility Assistant Service, right click it, and click Properties.
3. Change the Startup type to Disabled and click Stop.

Now you’ll no longer see this box and can use the saved mouse clicks and time!

Hope this will help you!

Please Remember me in your prayers!

How to Setup a DHCP Server on CentOS 6.2

In this scenario, we have a CentOS server with two network cards, but it will only listen the dhcp request on one card (eth1).

Here is the configuration of eth1 interface:

cat /etc/sysconfig/network-scripts/ifcfg-eth1

CentOS as DHCP Server:

To install dhcp server, enter the following command at a terminal prompt:

sudo yum -y install dhcp

To make the dhcp server start at boot time, use this commands:

sudo chkconfig dhcpd on

As we are using more than one network card(s) in our CentOS server, so we need to specify on which interface our server will be listen for dhcp request. (By default, it listens on eth0).

You can change this by editing  /etc/sysconfig/dhcpd file:

sudo nano /etc/sysconfig/dhcpd

Add the name of the interface on which you want that your server will listen for dhcp request (In my case, it is eth1):

DHCPDARGS=eth1

Copy the default configuration file from  /usr/share/doc/dhcp-versidhcp/dhcpd.conf.sample to the /etc/dhcp/dhcpd.conf :

sudo cp /usr/share/doc/dhcp-*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

Now we will change the default configuration by editing /etc/dhcp/dhcpd.conf, I normally delete everything inside the file and manually add the configuration that suits my needs :-)

sudo nano /etc/dhcp/dhcpd.conf

Here is my dhcpd.conf file, you need to change it according to your needs:

ddns-update-style none;
authoritative;
log-facility local7;
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 172.16.10.255;
option routers 172.16.10.1;
option domain-name-servers 172.16.10.1;
option domain-name "centos.local";
subnet 172.16.10.0 netmask 255.255.255.0 {
 range 172.16.10.10 172.16.10.100;
}

Restart dhcp service using the following command:

sudo service dhcpd restart

Configure Windows as DHCP Client:

Just follow these steps, in order to configure your Windows machine as DHCP client (In my case, it’s Windows XP):

To check the IP Address on Windows XP:

To Check the DHCP Leases on CentOS Server:
cat /var/lib/dhcpd/dhcpd.leases

Hope this will help you!

Please Remember me in your prayers!

Time synchronization on Ubuntu 12.04LTS using NTP

To install the ntp, just enter this command at the terminal:

sudo apt-get install ntp

After installation, edit the default ntp configuration:

sudo nano /etc/ntp.conf

Commented out the default Ubuntu server,you can add your own time-servers here to synchronize with, http://www.pool.ntp.org/zone/europe or http://www.pool.ntp.org/zone/north-america lists:

After you are done with the configuration, just restart the ntp service:

sudo service ntp restart

To check if the NTP service is synchronizing:

sudo ntpq -c lpeer

To check the synchronization log:

sudo tail -f /var/log/syslog

Geeky Comparison with Windows clock after synchronization 🙂

Troubleshooting:

If you are using the firewall, then just allows port 123 on UDP level.

Hope this will help you!

Please Remember me in your prayers!

How to install Webmin on Ubuntu 12.04

Webmin is a web-based interface for system administration for Linux/Unix. You can setup user accounts, Apache, DNS,DHCP, file sharing and much more by using any modern web browser.

First, we need to install the dependencies with the command:

sudo apt-get install perl libnet-ssleay-perl libauthen-pam-perl libpam-runtime 

openssllibio-pty-perl apt-show-versions python

Now, we need to download the Webmin deb package from Sourceforge (I download it  in /tmp directory):

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb

Then just run the command :

sudo dpkg --install webmin_1.580_all.deb

Webmin is installed now and you will be able to access it via a browser using, https://server-ip:10000. In my case it is,https://tendo:10000.

(It will show you the security warning, just accept it)

Enter your Username and Password that you use for login on to your server.

After login, Webmin main page will show you the summary of your server:

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: