Some of my experiences related to Opensources such as Linux, Python programming, Bash Shell Scripting.....
Wednesday, July 21, 2010
Web Sites Linkscanner That Help Us To Stay Away From Bad Websites
Personally I use McAfee Site Advisor. Here is my screenshot.
Green Mark means that you can trust this link. I don't need to explain about RED. Right? :P
Wednesday, June 16, 2010
Simplest and Easiest Web Server
One day, a user need to get some data from the server. For me, as long as server is running ssh service, I can get what I want by using sftp or scp. For user, it may be totally different universe. If I try to teach my user how to use sftp and scp at that time, he will complain,"Please,Mr.IT, don't make my life difficult.......".
Here is how I slipped out of difficulty by using a module of Python programming language.I ssh to server and on console I type:
ip add | grep inet ; python -m SimpleHTTPServerThis command will show ip addresses of server. All I need to do is asking my user to open up the browser and type myserver's ipaddress:8000. Now he can download the data on server to his computer easily. I included the screenshot to show you how it looks like in browser.
SSH & Me!
Question: What is SSH?
Answer: Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices
Here is how I utilize this ssh daemon in my daily life.
!)I have 3 intranet servers ( sshgateway, intrawebmail, and winterminal)
!)Firewall is configured so that I can only ssh to sshgateway from external i.e. My Home.
When I need to configure my linux server @ my office from anywhere,
#ssh root@sshgateway.mydomain.net
Ok internet connection is too slow...
#ssh -C –CompressionLevel=9 root@sshgateway.mydomain.net
Oh, I configured my server not to listen on port 22 (default sshd port) for security reason.
#ssh -p 443 root@sshgateway.mydomain.net
I must ssh to intrawebmail to fix some problems,but I can only access to sshgateway.
#ssh -t root@sshgateway.mydomain.net ssh root@intrawebmail
Now I get access to intrawebmail server.
Fixed! I need to check webmail from intrawebmail that is only accessible in office.
#ssh -L 8080:intrawebmail:80 root@sshgateway
1)In firefox, go to Tools>Option>Advanced>Network>Setting
2)In SOCKS host 127.0.0.1 port 8080
Now I can check my office webmail from outside.
How about my winterminal? Is it healthy?
#ssh -L 3389:interminal:3389
1)Now I can remote desktop to 127.0.0.1 that redirect to winterminal.
From public internet hot spot, I want to check my bank account. Network is not secure.
So, I will tunnel my traffic through my office network.(Some may call it "Bypassing Firewall")
#ssh -D 9999 root@sshgateway.mydomain.net
1)In firefox, go to Tools>Option>Advanced>Network>Setting
2)In SOCKS host 127.0.0.1 port 9999
Now my traffic is encrypted and I can check my bank account securely
One of my friends asks me to help with setting up a linux server. Although I want to help, his server is in Myanmar and I can not ssh to it because it is extremely protected by ISP.
What I do is:
I ask him to ssh to my sshgateway from his highly protected server;
#ssh -R 9999:127.0.0.1:22 root@sshgateway.mydomain.net
Then, on my sshgateway server , I ssh back to his linux server by using:
#ssh -p 9999 root@localhost
Now I can ssh to a host behind NAT and Firewall.
LAST BUT NOT LEAST
Now you know how we can utilize SSH in various ways. But let me remind you that running a ssh host on internet is not as easy as you think.
Believe it or not: everyday I get 5 to 13 report emails from my ssh server that tell
“ Some body is attacking ssh server by using bruteforcing............... and blah blah blah”
If you don't give enough attention to this log messages , somebody may be able to root your server one day. That compromised ssh daemon can even put you into jail.
Don't worry! I will show you how to secure ssh server, but not now. LATER.......
Hope it gives you some knowledge......
netlynker
Q: What is the best remote administration tool for Windows??
A: A car!
