Monday, March 30, 2009

Start network eth0 dhcp on bootup

Ran into a problem, the only interface going up was the loopback, after some research and testing found out that I had to add the following lines to /etc/sysconfig/network-scripts/ifcfg-eth0
===================================
BOOTPROTO: dhcp
ONBOOT:yes
===================================


Not sure if they have to be in any particular location within the file but my exact file looks like this:
===========================================================
# Name of card.....................
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=00:0.................
ONBOOT=yes
===========================================================

Then just reboot and enjoy!

(reboot or init 6)

Putty fix on windows

I had some annoyance with putty on my windows systems; I always forget where it downloads, or i moved it and the shortcut wouldn't work but the program actually saves keys in registry so it doesn't really matter where it is located...

So finally I decided to place it in C:\WINDOWS\system32 and run it by pressing windowskey+r to get to the run box and type "putty" without quotes (because anything in system32 with .exe will run from run box)

One more thing I have done since then is create a one line batch file to go with putty download in order to place it in system32 everytime installing it in a new system.
The one line is the following:
move putty.exe C:\WINDOWS\system32\putty.exe

Save that in text file and rename it to something.bat with putty.exe in same folder and run the batch.
Or just download it both from HERE

How to get SSH connection from remote networks

From my original reply to post: http://communities.vmware.com/thread/184369


Remote SSH to VMware
Dec 10, 2008 12:34 PM
drummingfool (3 posts since Dec 10, 2008)

Here's my issue:

I have set up vmware running CentOS 5.2 on a vista host machine. I would like to remote SSH into my centos from anywhere. I can ssh into centos locally from the host box, but not remotely. I assume this has something to do with port forwarding. I am running straight into a modem from the host box and therefore do not have direct port forwarding. I can also VNC into the host machine remotely. Also the windows firewall is off, as well as all firewall options on centos.

Someone help! having to vnc into the host box and then use vm is getting painfully slow. Any ideas?

----------------------------------other replies cut---------------------------------------------


Re: Remote SSH to VMware Mar 5, 2009 12:14 PM
in response to: drummingfool
bplotkin (1 posts since Mar 5, 2009)
Reply 4. Re: Remote SSH to VMware Mar 5, 2009 12:14 PM
in response to: drummingfool

You will need to enable ssh for external networks.

Open /etc/hosts.allow ( something like $vi /etc/hosts.allow) and add the following line at the bottom:
SSHD: ALL

or even easier type at the prompt
echo "SSHD: ALL" >> /etc/hosts.allow

This will allow all external networks to connect to the SSH service.
otherwise you can put an IP or a range of IPs to have a more secure system (google hosts allow for more information).

Sunday, March 29, 2009

Good router

Just tried out the WRT54GL from Linksys and I must say that it's just great.

UPDATE [March 2011]: if you are looking for more flash, ram and wireless N try the very cost effective:
TP-Link TL-WR741ND or a little better 
TP-Link TL-WR1043ND or one of the best available
Buffalo WZR-HP-G300NH with great specs, perfect for small business

For anyone who doesn't know, it is an open source firmware version from Linksys; which means you can change from the default routing admin interface (and features) - in which case this opens up for some amazing possibilities.

I choose the tomato firmware (just google for any others) and it just amazes me how much things get better when opening up the source code to regular people - communities form to improve software!

The major features I love are:
  • Bandwidth monitoring (as my local ISP has monthly limits),
  • QoS (Quality of Service) - which means downloading/uploading (things like bittorrents or moving large files) won't interrupt regular browsing on any computer connected,
  • SSH service is great for me because I don't have to run another Linux box or vmware just for it,
  • And finally it can also be used as a wireless bridge to connect off of existing wireless networks or to extend the range (but I havn't tried that yet so comment below if you have!).

It is really simple to upgrade:
1. Download the file Tomato_1_23.7z (or newest version) and unzip the folder
2. Log in to the Linksys firmware (Wired) at http://192.168.1.1/ (blank username, admin for password)
3. Click the Administration tab, then Firmware Upgrade.
4. Upload the WRT54G_WRT54GL.bin file - DO NOT Sneaze! this must complete without power or network interruptions, so it's best to wait patiently.
5. Wait to be prompted then enter root for username and admin for password (you should change that after logon)

Now for my favorite features (so far):
  • Bandwidth monitoring is enabled by default
  • Enable the QoS: click the QoS button on the left > check the Enable checkbox and click save.
  • SSH is enabled ineternally and can also be enabled for external networks but isn't recommended for begginers.
  • To change the wireless functions go to Basic > Network > choose Wireless Ethernet Bridge from the drop down menu of wireless section and click Save then you can click on Wireless Survey and connect to available networks.
Notice how saving settings does not restart the router as with most default firmware!

Enjoy!

Sunday, March 22, 2009

How to restore iphone from 3.0 to 2.2.1

A friend of mine had recently spent 5 hours trying to find the solution which was no where on the web, so for those of you still trying to figure this out here it is:

Put your iPhone in DFU mode

1. Open Up iTunes

2. Have Your iPhone Connected To Your Pc

3. Hold Down The Power/Sleep Button And The Home Button For Exactly 10 Seconds.

4. Then Release The Power/Sleep Button And Continue To Hold The Home Button Until iTunes Brings Up A Message Saying Your iPhone Is In DFU Mode.

5. Click Ok Or Whatever It Is So That It Closes That Popup.

6. Hold Shift Then Click Restore.

7.Then Make sure You Have Downloaded the ISPW Firmware. Called:

8. Let It Restore Once Its Finished You Will Get An Error Thats Normal It Will Most Likely Be 1015 Or Something Like That.

9. Download Quick Pwn 2.2.1.

*These steps are very important!

10. Then Open Up Quick Pwn With Your iPhone Connected To Your PC And It will then Say That You Need To Hold The Power/Sleep Button And The Home button For Exactly 15 Seconds Then Release The Power/Sleep Button And Continue To Hold The Home Button For 2 Seconds. This will boot your iPhone To the Emergency Call screen.

11.Open up iTunes And Let It Activate Your iPhone.

12. Then Restore your iPhone From A Previous Backup If you Have One.