Ananth's Blog - page 13

Posts

How to see open ports inLinux?

Type this netstat command in terminal.

netstat -tulpn

Or you can use this one.

netstat -l

Try netstat --help to go through other options also...

Testing NAT Port Forwarding and reverese NAT

For a long time I have been trying to configure port forwarding using NAT. But every attempt was futile...  Finally I found that my port forwarding works just fine. But it just appears to be not working because my router doesn't support reverse NAT. In this post I will show you guys how to test whether you configure your NAT correctly or not. (Read a detailed write up by shane. Link)

First make a port forwarding rule in your router say 1600. Download this little tool called simple internet tools. Install it and open port listener and select your internal IP(192.168.x.x). Then type your port number and press start listening.

Go to this site and check whether it says port is opened. If your connection is successful you will notice it in the port listener application.

Then go to your browser and type your internet ip address. (You can find it from www.whatismyip.com) . Tnen type your port number after a colon. (116.211.22.12:1600). Your browser shows a webpage not available window. Check your port listener. If you find a connection successful message it means your router supports reverse NAT. Otherwise reverse NAT is not available.

You can also check it by an nc command like this.

nc 116.211.22.12 1600

If you didn't want to test the connection using the above site you can do it by nc from a remote ssh account. Login to your ssh account and try to connect it with nc.

How to see DNS reply? or Testing DNS server?

Wonder how the dns works or want to know the dns reply from server? Sometimes when setting up a local dns server we have to test whether it is working or not. Here is how you can test it in Linux.

dig @127.0.0.1 www.google.com

Ultrasonic Hover Input Device

This was my Bachelor Project. The project was selected for the Malayala Manorama Yuva Master Mind 2014. This is a video describing the project at the final round in the competition.

How to send AT commands?

For details about AT commands refer this link.

If you are using windows you can use hyperterminal to communicate with any modem. In this case the GSM modem. Find a method to connect your GSM modem to the PC  (Refer this Link ). You can use a USB2TTL converter to directly interface your GSM modem to PC. After interfacing the modem go to device manager and find the com port no: assigned to your GSM modem.
After identifying the port number open hyperterminal. You need to download Hyperterminal or copy the files from windows XP. You can also use putty for this purpose. 
Type a name and click OK. Then select the com port you are using and press ok.
Change the boadrate to 9600(you can choose other also. Higher boadrates may not work with some GSM modem) and let other options remain unchanged.

After that type AT and press Enter. If you get a response showing OK. Then everything is fine. As a default typed character are not shown in the terminal. You can enable this by going to File=> Properties=> Settings=>ASCII Setup and check Echo typed characters locally.

You can follow the same procedures in putty also. This is a screenshot of putty.
You can do the same in Linux also. Use minicom or any other terminal softwares for communicating with you GSM modem in Linux. This link describes how to use minicom.
And this link describes how to identify the name of your modem.