Admins eHow

January 11, 2012

Fix nginx 502 Bad Gateway error

Filed under: General — Tags: , , , , — admin @ 11:01 am

Today I was getting “502 Bad Gateway” on a Glype proxy installation , after digging into the problem I found out it is a problem of nginx fastcgi buffers , here is how to fix it :
open /etc/nginx/nginx.conf
add the following lines into http section :

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

you config should look like this :

http {
.
.
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
.
.
}

restart nginx and fastcgi.

December 16, 2011

Linux Delete Empty Directories (Folders)

Filed under: CentOS,Debian,General,linux — Tags: , , , , , , — admin @ 6:01 am

As simple as one single command :

find -type d -empty -delete

September 26, 2011

Gateway on a different subnet on Linux

Filed under: Debian,General,linux — Tags: , , , , , — admin @ 7:50 am

Theoretically host IP and gateway should be on the same IP subnet. but there are some situations where host IP and gateway subnet are on different subnets. like my situation today. I was assigned two additional IPs for my server by my Data-center, but IPs were from a different subnet compared to server main IP. these IPs will work if you set them as additional IPs. but I needed them to create two new VPS’s on my server with bridged network interface. in this situation additional IPs should serve as main IP address and there is no gateway on same subnet available.
So here are the assumptions :

a.b.c.d is the host IP
e.f.g.h is the gateway IP
a.b.c.d & e.f.g.h are on different subnets.

by default if you try to set gateway by following command :

route add default gw e.f.g.h

you will get this error :

SIOCADDRT: No such process

the trick is simple , first add a route to default gateway itself and then set the default gateway , like this :

route add e.f.g.h/32 dev eth0
route add default gw e.f.g.h

remember you may need to change eth0 to your device name , it may be eth1 or wlan0 or anything.

How to make these route changes persistent ?

For Debian/Ubuntu :
Add the following lines to /etc/network/interfaces :

post-up route add e.f.g.h/32 dev eth0
post-up route add default gw e.f.g.h

September 19, 2011

Steve Jobs’ 2005 Stanford Commencement Address – Must See

Filed under: Apple,General — Tags: , , — admin @ 8:25 pm

If you read my blog , you will know that I am not a fan of Apple. In fact I fight against its dominance and its policies.but I really admire this man, Steve Jobs. He deserves what he has acquired.
I recommend everyone to listen to this speech very carefully several times and make use of advises of this man. What he says and recommends in life is very true and useful.

Watch here :
Steve Jobs' 2005 Stanford Commencement Address

The text of speech :
‘You’ve got to find what you love,’ Jobs says

September 14, 2011

An analysis of recent security breach to DigiNotar and Man-In-The-Middle attack to Iranian users

Filed under: General,Security — Tags: , , , , , , , — admin @ 9:23 am

As I have received several requests from Iranian readers of my blog, I have done some analysis on recent DigiNotar security breach and MITM attack to Iranian users.
This analysis is based on Fox-IT interim report of breach. You can download the complete report in PDF Format from the following link :
http://www.adminsehow.com/wp-content/uploads/2011/09/rapport-fox-it-operation-black-tulip-v1-0.pdf

What is MITM attack and how to prevent it ?
MITM stands for Man-In-The-Middle. it simply means someone stands between you and destination and intercepts or modifies your communication. it is quite easy when communication is not encrypted.
SSL protocol is originally invented to address this issue. The idea is that a trusted Authority (CA) authenticates the identity of destination and by using some cryptography protocols your connection to authentic destination becomes encrypted and impossible to intercept or modify.
It has been shown that the cryptography methods like AES or RC4 which are employed to encrypt the data are quite effective and very hard to crack. so the easier solution is to attack the base of trust model, the trusted authorities (CA). In this kind of attacks, hackers break into CA systems and forge valid certificates for themselves so they can impersonate themselves as authentic destinations and intercept the data. this kind of attack is used in both recent incidents, Commodo and DigiNotar.
Although the protocol is almost safe itself, unfortunately many of these CAs are vulnerable themselves making the whole process vulnerable.
The FOX-IT report indicates the DigiNotar systems were using Windows (Which is vulnerable in nature) and passwords has been crackable through brute-force attack. (More on this later)

To understand it better, I have created a diagram of recent MITM attack to Iranian users with the goal of intercepting communications between them and Google. the attackers have been able to gain access to Google accounts of users through this attack :

This diagram is self-explanatory. The attacker in middle impersonates itself as Google and establishes a secure connection to the user which is signed by DigiNotar CA. Although the connection is still secure, but users have a secure connection to the attacker, not real Google. so attacker has access to all information sent by user, including username, passwords, cookies and etc.
(more…)

September 5, 2011

IPTables packet traverse map

Filed under: CentOS,Debian,General,linux,Security — Tags: , , , , , — admin @ 7:23 am

1.

(more…)

June 7, 2011

Thanks to Android, HTC sales in May reached $1.42 billion, more than double last year’s total

Filed under: General — Tags: , , , , , — admin @ 3:52 pm

HTC has doubled its sales in 1 year by selling android phones, it shows how smart the managers of HTC are.
HTC originally had a partnership with Microsoft to implement WP7 on its hardware, when HTC implemented Android, Microsoft sued HTC due breaking the agreement.
Finally HTC insisted on using Android and agreed to pay $5 fine to Microsoft per Android device sold. Microsoft has received millions of dollar from HTC so far due to this fine.
In fact Microsoft has made more revenue from Android compared to its own mobile solutions ! Microsoft should be a big fan of Android now.
Current position of HTC puts Nokia partnership with Microsoft in question , when Nokia chose WP7 for its smartphones , Google made an announcement calling Nokia’s decision a big mistake.
Is Nokia wise enough to pay millions dollars of fine to Microsoft like HTC did and implement Android ? We should wait and see :)
All of this are very bad news for Apple. no company likes to see its competitors having 100% revenue increase in just one year.
I can see the comments of disappointed Apple Lovers all over the web now , begging Apple to do something , like this one :

Please Apple put some effort in your next phone. Otherwise i have to buy one of these HTC products too.

Its time to say goodbye to iOS and iPhone and switch to Android :)

Source :
http://www.engadget.com/2011/06/07/htc-sales-in-may-reached-1-42-billion-more-than-double-last-ye/

June 6, 2011

No iPhone 5 for Apple lovers , Apple stock price fall

Filed under: General — Tags: , , , , , , — admin @ 10:35 pm

Regardless of announcing some new updates including iCloud, iOS 5 and Mac OS X Lion in Apple’s WWDC 2011, The Apple stock price fell dramatically this afternoon losing 4.57% of its value.
Seems the investors already know that apple has fell behind the competition and has nothing new to offer. I expect more price fall and a gap between today’s closing price and tomorrow’s opening price for AAPL.

It is very clear that market is not satisfied and will continue to react to absence of announcement of an iPhone 5.
Many apple lovers were waiting for iPhone 5 and with no clear release date, a large portion will decide to not to wait anymore and buy an available phone.
It makes a brilliant opportunity for android device makers like Samsung, HTC, LG and Motorola to saturate the market with their own products and cut the Apple’s market share even faster.
Some rumors suggest that iPhone 5 will be released with iOS 5 this fall, but even if it’s true, it is a very bad move for Apple. disappointing many customers.
It is time to say goodbye to iPhone and switch to Android devices :)

May 25, 2011

YouTube Monkeys

Filed under: General — admin @ 7:59 am

No Comments :D

May 16, 2011

iPhone 4 awarded Guinness World Records – Poor Apple

Filed under: General — Tags: , , , , — admin @ 7:09 am

After market of smart phones is conquered by an army of Android phones and iOS market share is falling so fast,
I heard the news that iPhone 4 is awarded some Guinness Word Records , it seems a good news for fruit company fans at the first glance, but they should hope no one reads the full story :D
Lets see what is the Record for : “Fastest-Selling Portable Gaming System” wtf ! and it is compared to PSP and Nintendo.

Guinness states that the iPhone 4’s first-day sales estimates of 1.5 million make it the fastest selling game system in history. By comparison the PSP only sold 200,000 units its first day and the Nintendo DS sold 600,000 units in its first week.

I guess fruit company should sue Guinness for this record because everyone was thinking iPhone is a smartphone and does not fall into the category of portable gaming systems ! lol
and now we may expect some new records for iPhone in near future :
The fastest selling portable internet TV ( cause you can watch youtube on it )
The fastest selling portable WC notification system ( cause it shows the place of public WC’s on the map )
and many more …
After fruit company shot itself in the leg by suing Samsung for some nonsense claims, now we see this desperate attempt to save iPhone.
I am sorry Steve, let me tell you what you should do to save iPhone market.
You should create an iPhone with Android OS on it , If I remember correctly it is what you have already done for your desktops and laptops after your share of desktop and laptop market dropped to nothing. right ?
you let users buy your products and install windows on it. that was a wise decision :)
Why don’t you learn a lesson from history ?

« Newer PostsOlder Posts »

Powered by WordPress