Fixing ethernet network connection

Issue: When plugin in the Ethernet cable to computer would be not have a connection.
Reason: Ethernet driver is not installed, corrupted or out of date.
motherboard: Asus z97-AR
Intel CPU: Intel Core i7-4790K
operating system: Window 7

Fix:
Go to device manager.
Under ‘Other devices’ the Ethernet Controller has a warning icon

donwload then extract ‘Turbo LAN V1.04.01 for Windows 7/8/8.1 32bit & 64bit.’ driver from asus site

In device manager right click on ‘Ethernet Controller’ then ‘Update Driver Software’ then ‘browse my computer for driver software’
Browse to the extracted folder ‘Intel_LAN_Win7-8-8-1_VER191510’ then click next

Restart computer

Raspberry Pi troubleshooting

Error: ‘No space left on device’
# check memory size.

$ df -h

# None should have 100% but if so here is how to fix it

$ sudo raspi-config

# select ‘Expand Filesystem’ then restart computer when prompted
https://steve0hh.wordpress.com/2013/02/10/raspberry-pis-no-space-left-on-device-error-message/

Changing keyboard layout

$ sudo raspi-config

# select Internatinalisation Options->Change Keyboard Layout->Generic 105-key (Intl) PC->Other->English (US)->English (US)->Right Alt (AltGr)->No compose key->…
# alternative http://baligena.com/changing-keyboard-layout/

Fix Raspberry pi zero wifi disconnect/sleeps after a certain period of time. source, and here

$ sudo nano /etc/modprobe.d/8192cu.conf

Add these lines
# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

After a while the monitor will wont work and you will not be able to see the command line once you plug in the HDMI. It goes black and you cannot see the screen. In order to keep the terminal alive here what is need to be done. source, source2

$ sudo nano /etc/rc.local

ABOVE the “exit 0” line insert:
setterm -blank 0 -powerdown 0 -powersave off

$ sudo reboot

# As of 2016-07-03 you cannot update raspberry pi packages thus some programs cannot be updated such as git.
# to have the latest git version you will need to install it by source
How To Install Git from Source

PuPHPet troubleshooting

You may avoid issues by using the MINGW32 terminal instead of something else.

 

Installed a new puphpet and the web page won’t show up.

  1. vagrant ssh
    • inside the puphpet folder
  2. $ telnet locahost 80
    • verify a successful response
  3. $ sudo service apache2 restart
    • if apache2: Configuration error: More than one MPM loaded.
      1. $ sudo a2dismod worker
      2. $ sudo service apache2 restart

If php file is being read as plain text.  This was a phpmyadmin issue

  1. run $ sudo apt-get install libapache2-mod-php5
  2.  restart apache

You may get an phpmyadmin error ‘phpmyadmin.pma_table_uiprefs doesn’t exist’ when you attempt to open database tables
http://stackoverflow.com/questions/20731487/phpmyadmin-pma-table-uiprefs-doesnt-exist#answer-24937839
run this command
$ sudo dpkg-reconfigure phpmyadmin

Vagrant: Fix VT-x/AMD-V hardware acceleration

Operating System: Windows 7
Motherboard: asus z-97-ar
Intel CPU: Intel Core i7-4790K

Does your CPU support virtualization?

Download software https://www.grc.com/securable.htm

You must enable Virtualization in BIOS
Advvance -> CPU Configurations -> Intel Virtualization Technology -> enable

The reasons I had to enable VT-x was because when I “vagrant up” I received these error

1. In the command like it got stuck on “default: Warning: Connection timeout. Retrying…”

2. in Oracle Virtualbox:
“VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.”

So to resolve that I need to enable VT-x and in my Vagrant file add

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
end

Resources:
http://askubuntu.com/questions/41550/how-do-i-run-a-64-bit-guest-in-virtualbox#answer-41554

tags:
homestead laravel

SSH Private Key conversion

In attempt to login into a ssh server using a private key in phpstorm I ran accross this error.

Keypair ‘private_key.ppk’ is corrupt or has unknown format. Only SSH2 keys in OpenSSH format or PuTTY Private Key *.ppk are supported. Error message: The cipher ‘aes256-cbc’ is required, but it is not available.

This error will not allow the “next” and “test connection” button to appear

The issue here is that the private key format is incorrect. You’ll will need to convert the private key to open ssh format. And the way to do that is

Open your private key in PuTTYGen
Top menu “Conversions”->”Export OpenSSH key”.
Save the new OpenSSH key when prompted.

Ubuntu Adding Packages

When attempting to install a program thru apt-get the most frustrating moment is when the program cannot be found and what’s worst is not being able to add the package to install the program. In the past attempting to add packages by editing /etc/apt/sources.list has been unsuccessful but success has came from adding thru “apt-add-repository” command line command. Here are examples.

Where to find packages
https://launchpad.net/ubuntu/+ppas
ppa packages info

To install cmake:
# https://launchpad.net/~kalakris/+archive/cmake
$ sudo apt-add-repository ppa:kalakris/cmake
$ sudo apt-get update
$ sudo apt-get install cmake

To install emacsen-common:
# http://www.ubuntuupdates.org/ppa/kubuntu-ppa_backports?dist=precise
$ sudo add-apt-repository ppa:kubuntu-ppa/backports
$ sudo apt-get update
$ sudo apt-get install emacsen-common

To install cheese
# http://packages.ubuntu.com/precise/i386/cheese/download
# adding a line to your /etc/apt/sources.list like this:
deb http://cz.archive.ubuntu.com/ubuntu precise main universe
$ nano /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install cheese

View package info

$ apt-cache policy [package name]
# apt-cache policy cheese

Wireless Connecting but not Internet

Today I used wireless internet at a doctors office. When I arrived back home home my Dell Latitude computer could not connect to the internet wirelessly (could connect thru a ethernet cord). It showed as connected to my router but not the internet. There were no issues with the router and the internet because my iphone could surf the internet. It seems that when I connected to the internet at the clinic it messed up my PC. Here how I fixed it.

Right clicked on the “monitor in front of monitor” icon at the bottom right corner and selected “connect to network”.

Right clicked on the internet that I was trying to connect to and selected “diagnose”.

A new window opened and I clicked on an option that said something about “resetting the the ip address” (not exactly sure) and it showed a loading screen saying “repairing”. And that fixed it

tags:
wireless connecting but no internet

Virtual Box Internet Issue

The problem:
unable to connect to internet
$ ping google (doesnt work)

What might cause the problem:
Added the ‘Host-only Adapter’ network to the virtual box

Solution:
remove static ip from /etc/network/interfaces (changed it back to dynamic)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
#       address 192.168.0.108
#       netmask 255.255.255.0
#        network 192.168.0.0
#        broadcast 192.168.0.255
#        gateway 192.168.0.1

remove the 2nd network and only stayed with the 1st one (Bridged Adapter)

reflesh the MAC address (not sure if this help)

reboot

edit /etc/network/interfaces changed back to static ip address

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
        address 192.168.0.108
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

OR
edit using the GUI
http://askubuntu.com/questions/338442/how-to-set-static-ip-address#answer-338855

operating system:
Linux cowboy 3.12-kali1-686-pae #1 SMP Debian 3.12.6-2kali1 (2014-01-06) i686 GNU/Linux

Change Linksys WRT54G Default Gateway IP Address

Changing linksys local/default gateway ip address from 192.168.1.1 to 192.168.0.1

1. Connect an Ethernet cord to you router LAN and your computer
2. Login into the router by opening a browser and typing 192.168.1.1
3. Go to Setup-> basic setup
4. change “Local IP Address:” to 192.168.0.1
http://x-v.it/f3eru4

5. Unplug the power to the router and Ethernet cord from the computer and wait 30 seconds
6. Plug everything back and you should now be able to log into router with 192.168.0.1
and if you run ipconfig in the command line you should see the default gateway as 192.168.0.1
http://x-v.it/n9dfjf
also see other parts of the software with same ip address such as http://x-v.it/fna6kj

7. Unplug the Ethernet cord from the computer and see if you can connect to it wireless
8. Plug the router WAN to the modem for internet.
9. You’ll need to configure you linksys router to get internet

Setting Up Linksys Router


10. Done.

The reason I needed this was because I have two routers and they cannot have both the same gateway 192.168.1.1

How to change the motorola router

Motorola SBG6580 Router / Modem

Motorola SBG6580 Router / Modem

My router was recently changed and I tried to bridge it (act only as a modem) but it didn’t work. I had a perfect working Linksys router but my ISP had to changed my old modem to a 2 in 1 piece of shit Motorola SBG6580. The default gateway for the Motorola is different than the Linksys so I had to re-configure my server, which I did however there were some stuff that wasn’t working correctly. I didn’t know how to track it down or how to fix it so instead of going thru that headache I decided to change the Motorola default gateway/LAN IP address to what the Linksys was and it worked.

To change the LAN IP address from 192.168.0.1 to 192.168.1.1
log into you motorola router 192.168.0.1
Navigate to,
Basic-> Setup-> change Lan Ip address to 192.168.1.1
then click apply. you wont be able to connect to wireless internet
so connect to the Ethernet cord and go to
Basic-> Setup-> click “Renew WAN LEASE”

Motorola SBG6580
http://x-v.it/uploads/capit/sa/62/4k.jpg

resource:
http://broadband.custhelp.com/app/answers/detail/a_id/22215