You are here

Risharde's Blog

NAT forwarding on OpenVZ Linux (iptables)

This allows NAT (basically for routing internet) for your VPN
iptables -t nat -A POSTROUTING -j SNAT --to
iptables -t nat -A POSTROUTING -s /8 -o venet0 -j SNAT --to-source

List/Check the rules
iptables -t nat --list

Enable ipforwarding for ipv4 via /etc/sysctl.conf

Getting Unix Bench to run on CentOS

Okay, firstly you have to download Unix Bench via http://code.google.com/p/byte-unixbench/

You can use the wget command to do this

Next, after you download the unixbench.tar.gz file, you need to extract the files from the archive.
I use: tar -xvf unixbench.tar.gz

Make sure to install the libXext packages
I use: yum install libXext*

Go into the unixbench folder via the command line interface and type

./Run

That's it

Good luck! ;)

Normal Contracts Vs. Service Level Agreements

I have been thinking about how service contracts work in the communications industry with the largest players being Digicel, TSTT and Columbus Communications (FLOW). My main comparison will be between TSTT and Columbus Communications bearing in mind that I in no way believe I know much about the legal aspects.

I have noticed that nearly all TSTT services require a year long contract which disturbs me after experiencing a horrible track record of bad experiences with this large company. The impression I now have is that companies in Trinidad that lock you into yearly and / or long term contracts are not looking out for the consumer. I would like to further express that it seems that these companies that have such contracts are more interested in the long term money and profits they achieve while not sustaining or committing to proper customer care and providing the best value for money. In essence, the contract seems to be there to disuade you from moving to companies that may have better packages and short term contracts (if any at all) and in many cases with cheaper prices. Therefore you should ask yourself and / or remind yourself that if you decide to take such long term contracts, YOU ARE SUSTAINING THESE COMPANIES AND ENCOURAGING THEM TO OFFER YOU POOR SERVICE AND / OR EXPENSIVE SERVICES REDUCING THE VALUE OF THE MONEY YOU HAVE.

Let me alternate the perspective I am sharing here to express what I believe logically and makes "common sense". If a company offers you normal month to month billing, then it is in the best interest of that company (for example: Columbus Communications aka "FLOW" to the typical Trinbagonian) to provide adequate services and / or maintain or intend to maintain a failry high level of customer satisfaction on a monthly basis. The consumer power is therefore "more powereful" in this scenario because the customer has the choice without penalty to stop paying for poor service which implies some form of fairness (Good Service=Continuous profits).

These contracts should not be confused with Service Level Agreements which deal more with maintenance of good service versus rebate for inadequate or poor services.

So what am I trying to say?
Simple, you wouldn't want to hire someone you didn't know to construct your house on a yearly contract because if that person doesn't deliver, the only party losing out is you... so why choose a company such as TSTT where you have to sign up for a whole year to get a price for internet which is still more than paying a company like Columbus Communications a lower price on a month to month basis for two times more internet bandwidth / speed.

If you can't understand that, I can't help you with anything else. If you do understand and agree with what I just said then I give you kudos where kudos is deserved.

Fail2ban 0.8.8 configuration to block SSH bruteforce on CENTOS

Okay, so I'm relatively new to fail2ban and after installing fail2ban from the source tar.gz files, I noticed the that the /etc/fail2ban/jail.conf settings for blocking ssh looked a bit odd concerning the "log" file it was suppose to scan. By default, the configuration looks at the /var/log/sshd.log file which does not exist in CENTOS 5 so after some research, I found out that the log file should be set as /var/log/secure . The clause should look like the following:

[ssh-iptables]

enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=risharde@gmail.com, sender=fail2ban@dev.risharde.com]
logpath = /var/log/secure
maxretry = 5

In the above, please replace my email address with your email information...

Good luck!

Toast to the bridesmaids examples

VERSION 1
Thank you Master of Ceremonies, family, friends, distinguished guests.

Firstly, to my and his lovely bride congratulations!

Today, I am ecstatic being given the envious opportunity
to propose a toast to 7 beautiful, elegant, charming, stunning,
exquisite, intelligent young braidesmaids and of course to thank
God that none of them fell in slow motion style at the altar!
Ladies and gentlemen, please raise your glasses as we toast
to the bridesmaids. Bridesmaids, we salute you!
Thank you

VERSION 2
Thank you Master of Ceremonies, family, friends, distinguished guests.

Firstly, to my and his lovely bride congratulations!

Today, I am ecstatic being given the envious opportunity
to propose a toast to 7 beautiful, elegant, charming, stunning,
exquisite, intelligent young braidesmaids and of course to thank
God that none of them fell in slow motion style at the altar!
Ladies and gentlemen, please raise your glasses as we toast
to one of the best support systems a bride could ever have.
Bridesmaids, we salute you!

VERSION 3
Bridesmaids form part of the integral structure of support before, during and
after weddings. Without their final approval of the groom, no wedding would take place!
Today, I am ecstatic to salute 7 beautiful, elegant, stunning,
exquisite, intelligent bridesmaids that adorned the bride!
Ladies and gentlemen, please raise your glasses as I toast to these young ladies.
Thank you.

Good luck!

Changing default SSH port in CENTOS

I thought this would be useful in helping to secure your CentOS linux box better

So basically, the default SSH port is 22 allowing anyone to be able to get to your username and password prompt and do some bruteforcing etc.

You can move SSH to a different port by editing the /etc/sshd/sshd_config file

I like to use nano (a small text editor to edit text files in CentOS) so basically you type the following at the console prompt

nano /etc/sshd/sshd_config

Look for the line
#Port 22

Remove the # from the start of the line
Change the number 22 to some other number. Make sure the number is a positive number and less than 65535. Also make sure its not a port in use. For example port 80 is used for http so you never want to use a port that is currently in use by another server application that is listening for connections.

Save your config file

Then do the following:

service sshd stop

Then

service sshd restart

Now open another ssh client and connect to the new port and make sure it is working before you close off your previous ssh client connection (this is to make sure that you can get back into your linux box)

WARNING: IF YOU DO THIS WRONG, YOU CAN LOSE ALL ACCESS TO YOUR BOX!!! WHICH COULD BE SERIOUSLY HORRIBLE.

Good luck

SSH Timing out / Timeouts Fix

Okay, so I have CENTOS installed and realized that if I connect to the server via SSH but stay idle for a while, the connection closes on me. Well apparently there's a setting that solves this problem. Edit your /etc/ssh/sshd_config file

nano /etc/ssh/sshd_config
Now add the following to the end of the file:

KeepAlive yes ClientAliveInterval 30
Now save the file and either restart your sshd service or reboot

NOTE: PLEASE BE CAREFUL! EDITING THE SSHD_CONFIG FILE WRONGLY COULD LEAD TO LOGIN PROBLEMS. IN OTHER WORDS, IT CAN CAUSE YOU TO NOT HAVE ACCESS TO YOUR DATA SO DO IT CORRECTLY!

4G Internet Regression?

Sorry but are we regressing in technology? Why would I want a 4G limited internet plan for my phone? So I could give money to money hungry cellular phone companies? I don't know about you but I am not stupid enough to do that. Since Digicel Customer Care did not contact me back within my 24 hours request I want to urge everyone to stay away from these 4G packages that are not unlimited (in other words, stay away from this limit package). It is not of true value to you nor in your best interest to pay for a limited amount of internet... this will only cause YOU to lose more money than you should. My best suggestion is always go with an unlimited internet plan especially when you are doing anything with multimedia or social media such as youtube, facebook etc. Do not succumb and encourage companies to ride your backs.

Did you know that Digicel Trinidad and Tobago does not support Blackberry Internet Service to be tethered to your laptop? What sort of company that wants to revolutionize cell phone services in Trinidad and Tobago would not be competent enough to offer this service? Maybe perhaps they are interested in selling you their limited 4G packages so that they can suck you dry of your money while they become corporate giants. Think about it, either way, it isn't good for you.

I know that even after I say all this, some of you will still encourage this but I have to try. It's purely ridiculous, illogical and down right a lack of intelligence. We need to get out of this 3rd world mentality.
There should be one package that just works, you should not have to order 3 packages just to get internet for the month. This makes sense only to the corporate giants at YOUR EXPENSE.

BE SMART!

Keshorn Walcott

Keshorn Walcott, you is the man of the hour! Don't take on them people who jealous you get so much stuff, you deserved it, well done!

Pages