Monthly Archives: May 2016

Setup A Wifi Router using a Laptop Running Windows 7

In work, I need to connect to LAN using Windows OS (running some CISCO NAC software).  However, all developers are using Linux laptops.  Running virtual machines in Linux with Windows 7 OS, failed to connect to the LAN with the CISCO NAC software.  So I tried to set up a Windows 7 laptop which can connect to the LAN (with this CISCO NAC software), and turn the laptop wifi into hosted mode, so that all Linux laptop can connect to it and use the LAN interface to access the network.  Initially, I set up the ad-hoc network, but no machines (linux and windows) can connect to it.  Android cannot even see it.  Then I read about the the windows miniport setup, which is able to turn the laptop wifi into an access point with hosted mode instead of just an ad-hoc network.  This is great for it should work with all laptops as well as android phones.  This is how to do it:

Step 1: Press start and type cmd and right click on it click on “Run as Administrator”
Step 2: Type netsh wlan stop hostednetwork and press enter.
Step 3: Type netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD keyUsage=persistent and press enter.
Step 4: Type netsh wlan start hostednetwork and press enter.

That’s it!  You can now scan the network with laptop or android phones and connect to it.  To share the network, modify the properties of the LAN interface to allow internet sharing through the newly created miniport adapter.

Details explanation can be found here:

In one of the setup, the network is created, devices are able to connect to the network but IP addresses cannot be obtained (stuck at obtaining IP addresses…).  To fix it, modify the miniport adapter properties by removing all ticks except the TCP/IPv4.  Then, repeat step 1 to step 4.

More posts here: and here:


Sending Emails from Redhat to External Email Addresses

There is a need to send the cronjob output from a server to an external email address.  The server is not allow to connect to the internet, so a relay is required.  All emails will be forwarded to the SMTP server (acts as a relay) and then sent to the internet.  To do that in Redhat, edit the file /etc/postfix/  Change the following:


Check for syntax error:

postfix check

List down all non-default configuration:

postconf -n

Restart the mail service:

service postfix restart



Sending Emails from Solaris to External Email Addresses

There are many cronjobs running on the servers I maintained.  Each cronjob creates output which needs to be sent to the external email addresses.  However, none of the cronjob mails were received by the external email accounts.  I guess the servers were not setup correctly.  I run the mail program from the terminal and got a bounced email with the following content:

The original message was received at Fri, 20 May 2016 12:02:03 +0800 (MYT)
from localhost []

   ----- The following addresses had permanent fatal errors -----

   ----- Transcript of session follows -----
550 5.1.2 <>... Host unknown (Name server: host not found)

The configured STMP server is but this host name is not valid.  I’m not sure how to modify the SMTP server configured, but I do know the IP address of the SMTP server.  So, I add the following line to the /etc/hosts file:

Then, all emails can now be sent to external email accounts successfully.