Whitelist IP or IP range in/out using iptables

#Flush existing rules
iptables -F

# Set up default DROP rule for eth0 (Assuming eth0 is the Ethernet Port)
iptables -P INPUT DROP

# Allow existing connections to continue
iptables -A INPUT -i eth0 -m state –state ESTABLISHED,RELATED -j ACCEPT

# Accept everything from the 192.168.0.x network
iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j ACCEPT

# Allow connections from this host to 192.168.1.10
iptables -A OUTPUT -o eth0 -d 192.168.1.10 -j ACCEPT

Download the favicon icon from any website

It is possible that you might like a favicon (yes the logo icon that is displayed in the browser tab) of a certain website. Now, normally most of the websites store it in the form of favicon.ico in the root directory of any website. So, you can just type in: http://domain.com/favicon.ico and download it when it appears in the browser.

But, not all the websites store it this way. If you find it hard – let it be done by Google. Just type in the following link in the web browser – and it will show you the favicon.ico:

To get the favicon for a domain, use

http://www.google.com/s2/favicons?domain=www.domain.com

To get the favicon for an URL, use

http://www.google.com/s2/favicons?domain_url=http%3A%2F%2Fwww.domain.com%2F

 

Replace domain.com with the actual domain from which you’d like to download the favicon from.

How to write unique contents using WordPress plagiarism checker

If you are writing blog posts and actually copying content from other sites – you’ll not be doing any good (if not bad) to your blog from SEO perspective. The math is simple – if the content is not yours – do not put it in your website.

Now the question is how are you going to get unique contents? Simple – write your content yourself. To make sure your content is not matching that with someone else’s – you may check your content with Plagiarism checker. While there are standalone system for plagiarism check – there is a plugin for WordPress – which does it right from the wordpress editor. Moreover, it is FREE.

free plagiarism checker plugin for wordpress for unique content

However, if you are not working with WordPress and would like to use something like this – here is a link where you can do so: http://smallseotools.com/plagiarism-checker/

 

GMail Phishing scam – Becareful !!

If you are a tech savvy person – you probably know how phishing works. However, this time attackers tried to use optical illusion to trap people into a new phishing scam targeting the GMail users. Here’s how it looks like:

gmail phishing scam URL

Scammers attach an image which looks like it is an attachment. When you click on it – it takes you to the scammers destination – to the phishing link. And if you ignore the login URL – you are DONE!!

The phishing login page has been tricked as well to look like it is from Google. So even the most savviest person may fall for the trick. Here is how the phishing page URL will look like:

gmail phishing scam data url

Img credit: The Hacker News

 

So, next time you are forwarded to any login page – double – triple check.

You may find more about it in this link.

SOLUTION!! How to find out the Windows key used in the computer

YOU WANT TO KNOW THE WINDOWS SERIAL KEY – WHICH WAS USED TO ACTIVATE YOUR WINDOWS.

Why?

  • You may be planning to re-install the windows. You may have lost the key.
  • You may be selling your computer and buying a new one – but want to retain your copy of windows.

No Worries. You can retrieve your key from the computer. In this case you’ll need a running windows to get the key.

Copy and paste the following into a Notepad, save the text file and rename the file to “productkey.vbs”:

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

Now run the file “productkey.vbs”. You should see something like this:

how to find out retrieve windows serial key from computer

Note it down and save it somewhere. Good luck.

How to change default SSH port 22 to something else

Internet connected Linux servers are always vulnerable to exploitation by the hackers/intruders. One of their common attack is through SSH. By default SSH servers are configured to listen to port 22 for SSH connection. Changing the port to something else will definitely add an additional measure in securing the server.

How to Change Default SSH port 22 to something else:

  1. Connect to your server via SSH (your ssh port is still 22) as the root user.
  2. Run this command: # vi /etc/ssh/sshd_config
  3. Find out this line: # port 22
  4. Delete the hash “#” sign from the beginning of the line and change the port to something else. Note down this new port very carefully. You’ll need to use this port for the SSH connection from the next login.
  5. Save the file and exit.
  6. Restart the SSH service by executing this command: # service sshd restart 

Now disconnect and try reconnecting with the new SSH port. Make sure you memorize the new port number or note it down somewhere.

PRISMA App for Android – Official download link in Google Play

People all around the globe are posting their photos with cool effects applied through a cool application named Prisma. The app was initially released for IOS – which means iPhone users were the ones to use it. Well – although late but Android users can use the app too.

You may find it hard finding the real Prisma app (By Prisma Labs, Inc.) in Google play – as there are a lot of fake Prisma apps there. Here is the official download link of Prisma:  https://goo.gl/JqAoUC