Difference between revisions of "User:Scott/04"

From FreekiWiki
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
{{TOC limit|limit=1}}
 
{{TOC limit|limit=1}}
 
__TOC__
 
__TOC__
 
==DHCP syn ak==
 
sudo dhclient
 
 
==Open Ports (view)==
 
nmap -P 0 localhost ( sudo apt-get install nmap)
 
netstat -l
 
 
==TCP/IP Open Connection==
 
lsof -i    (domain names)
 
lsof -i -n (ip address)
 
 
==DNS (view records)==
 
dig well.com
 
  
 
[[#top|top]]
 
[[#top|top]]
Line 35: Line 21:
 
  Reboot Machine
 
  Reboot Machine
 
   
 
   
  Browser Off-line?
+
  Is Browser Off-line?
 +
Is cable plugged in?
  
=BASH Shell (TS connection)=
+
[[#top|top]]
==Adapter or Onboard==
+
 
===lspci===
+
=Does computer recognize the Adapter?=
 +
=Are drivers compatable with Umbuntu?=
 +
 
 +
==lspci==
  
 
  lspci - Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 01)
 
  lspci - Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 01)
  
===lsusb===
+
==lsusb==
 
  lsusb - Bus 001 Device 003: ID 13b1:0026 Linksys
 
  lsusb - Bus 001 Device 003: ID 13b1:0026 Linksys
  
==DHCP==
+
[[#top|top]]
===DHCP Discover===
 
sudo dhclient
 
 
Listening on LPF/eth0/00:17:08:5f:dc:73
 
Sending on  LPF/eth0/00:17:08:5f:dc:73
 
DHCP-REQUEST of 192.168.1.8 on eth0 to 255.255.255.255 port 67
 
DHCPA-CK of 192.168.1.8 from 192.168.1.1
 
bound to 192.168.1.8 -- renewal in 36968 seconds.
 
  
[[#top|top]]
+
=Troubleshoot Network from CMD line=
  
===ifconfig===
+
==ifconfig==
 
  ifconfig
 
  ifconfig
 
   
 
   
Line 67: Line 49:
 
       inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
 
       inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
  
===iwconfig===
+
==iwconfig==
  
 
  iwconfig
 
  iwconfig
Line 74: Line 56:
 
         Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:01:FE:AB:AC
 
         Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:01:FE:AB:AC
  
==Ping (gateway)==
+
[[#top|top]]
 +
 
 +
==Ping Test==
  
 
  ping localhost 127.0.0.1
 
  ping localhost 127.0.0.1
Line 80: Line 64:
 
  ping gateway (route -n)
 
  ping gateway (route -n)
 
   
 
   
  ping 74.125.225.48 (google.com)
+
  ping 8.8.8.8 (google.com)
  
[[#top|top]]
+
ping well.com
 +
traceroute well.com (if installed)
 +
 
 +
==DHCP Discover==
 +
sudo dhclient
 +
 +
Listening on LPF/eth0/00:17:08:5f:dc:73
 +
Sending on  LPF/eth0/00:17:08:5f:dc:73
 +
DHCP-REQUEST of 192.168.1.8 on eth0 to 255.255.255.255 port 67
 +
DHCPA-CK of 192.168.1.8 from 192.168.1.1
 +
bound to 192.168.1.8 -- renewal in 36968 seconds.
  
 
==DNS (view records)==
 
==DNS (view records)==
 +
dig well.com (DNS NS + A records no MX records)
  
  Dig well.com (DNS NS + A records no MX records)
+
==View Open Ports==
 +
  nmap -P 0 localhost (sudo apt-get install nmap)
  
  ping well.com
+
==View Open TCP/IP Network Connections==
  traceroute well.com (if installed)
+
  lsof -i    (domain names)
 +
  lsof -i -n (ip address)
 +
 
 +
[[#top|top]]
  
=Network Tools (TS Connection)=
+
=Troubleshoot Network using Network Tools=
 
  System -> Administration -> Network Tools
 
  System -> Administration -> Network Tools
  
Line 106: Line 105:
 
  Protocol IPv4  - 192.168.1.x
 
  Protocol IPv4  - 192.168.1.x
 
  Hardware address: 00:17:08:5f:dc:73
 
  Hardware address: 00:17:08:5f:dc:73
 
[[#top|top]]
 
  
 
==Ping Tab==
 
==Ping Tab==
Line 115: Line 112:
 
  Determine gateway 192.168.1.x
 
  Determine gateway 192.168.1.x
 
  ping gateway
 
  ping gateway
  ping 74.125.225.48 (google.com)
+
  ping 8.8.8.8 (google-dns)
  
 
==Lookup Tab - DNS Records==
 
==Lookup Tab - DNS Records==
Line 128: Line 125:
 
  traceroute well.com
 
  traceroute well.com
  
=Network Manager =
+
=Network Manager Enable=
 
  System -> Preferences -> Startup Applications
 
  System -> Preferences -> Startup Applications
 
  EDIT = nm-applet --sm-disable
 
  EDIT = nm-applet --sm-disable
Line 134: Line 131:
 
[[#top|top]]
 
[[#top|top]]
  
=Network Cards=
+
=Network Adapters we Recommend=
==PCI Adapter==
+
==PCI Adapter==
 
  AZIO AWD154B (802.11G Wireless PCI Adapter)
 
  AZIO AWD154B (802.11G Wireless PCI Adapter)
  
Line 141: Line 138:
 
  Linksys Wireless-G USB Network Adapter with SpeedBooster v2
 
  Linksys Wireless-G USB Network Adapter with SpeedBooster v2
  
==Dial-Up==
+
=Dial-Up Configuration=
*Whizcoho – DIAL-UP
+
==Whizcoho – DIAL-UP==
  
 
  user = freegeek@whiz.to
 
  user = freegeek@whiz.to
Line 160: Line 157:
 
  bbooth76\@whiz\.to * jlister
 
  bbooth76\@whiz\.to * jlister
  
==About ssh==
+
[[#top|top]]
===Generating a key pair===
+
 
 +
=-----------------------=
 +
=SSH=
 +
==Generating a key pair==
 
  ssh-keygen -t dsa
 
  ssh-keygen -t dsa
 
  http://support.suso.com/supki/SSH_Tutorial_for_Linux
 
  http://support.suso.com/supki/SSH_Tutorial_for_Linux
 +
 +
==some ssh commands==
 +
 +
ssh -p 443 bob@oem (server listening on port 443)
  
 
=NFS - Network File Sharing (install server)=
 
=NFS - Network File Sharing (install server)=
Line 169: Line 173:
  
 
[https://help.ubuntu.com/community/SettingUpNFSHowTo SettingUpNFS]
 
[https://help.ubuntu.com/community/SettingUpNFSHowTo SettingUpNFS]
 +
 +
[[#top|top]]
  
 
==install nfs-server==
 
==install nfs-server==
Line 209: Line 215:
 
  (LocalFolder on client)
 
  (LocalFolder on client)
  
=Configuring SAMBA in Ubuntu=
+
[[#top|top]]
==Part 1 of 4==
+
 
[http://www.youtube.com/watch?v=Bo9HOadl-YM&feature=related Samba-Part1]
+
=SAMBA Part 1 of 4=
 +
#[http://www.youtube.com/watch?v=Bo9HOadl-YM&feature=related Samba-Part1]
 +
#[http://www.youtube.com/watch?v=LdlxPB2PCvg&feature=related Samba-Part2]
 +
#[http://www.youtube.com/watch?v=d86HFQ2oBB4&feature=related Samba-Part3]
 +
#[http://www.youtube.com/watch?v=1mmni9kXhcY&feature=related Samba-Part4]
  
 
  SAMBA uses (SMB) "Session Message Block"
 
  SAMBA uses (SMB) "Session Message Block"
 
  SAMBA uses (CIFS) "Common Internet File System"
 
  SAMBA uses (CIFS) "Common Internet File System"
  
===Install SAMBA===
+
==Install SAMBA==
 
  sudo apt-get install samba  
 
  sudo apt-get install samba  
  
===Edit the Configuration File===
+
==Edit the Configuration File==
 
  [ALT + F2] then  
 
  [ALT + F2] then  
 
  gksudo gedit/etc/samba/smb.conf
 
  gksudo gedit/etc/samba/smb.conf
Line 257: Line 267:
 
  create mask = 7777
 
  create mask = 7777
 
  directory mask = 7777
 
  directory mask = 7777
+
 
===Create dir to match SAMBA shares "Name and Permission"===
+
[[#top|top]]
 +
 
 +
==Create dir to match SAMBA shares "Name and Permission"==
 
  sudo mkdir -v /sjnPUBLIC  
 
  sudo mkdir -v /sjnPUBLIC  
 
  sudo mkdir -v /sjnREADONLY-EXT4
 
  sudo mkdir -v /sjnREADONLY-EXT4
 
  sudo mkdir -v /sjnWRITEABLE-EXT4
 
  sudo mkdir -v /sjnWRITEABLE-EXT4
  
===Change file permissions to match the config file===
+
==Change file permissions to match the config file==
 
  sudo chmod 777 /sjnWRITEABLE-EXT4
 
  sudo chmod 777 /sjnWRITEABLE-EXT4
 
   
 
   
==Part 2 of 4==
+
=SAMBA Part 2 of 4=
 
[http://www.youtube.com/watch?v=LdlxPB2PCvg&feature=related Samba-Part2]
 
[http://www.youtube.com/watch?v=LdlxPB2PCvg&feature=related Samba-Part2]
  
===Mount necessary partitions and devices===
+
==Mount necessary partitions and devices==
 
  Mount necessary partitions and devices in /etc/fstab  
 
  Mount necessary partitions and devices in /etc/fstab  
 
  (unless they are already mounted)
 
  (unless they are already mounted)
Line 278: Line 290:
 
  Is necessary if you want to auto-mount NTFS partitions to share on network
 
  Is necessary if you want to auto-mount NTFS partitions to share on network
  
===fstab configure===
+
=SAMBA Part 3 of 4=
 +
[http://www.youtube.com/watch?v=d86HFQ2oBB4&feature=related Samba-Part3]
 +
 +
After modifying files in /etc - restart the daemon
 +
 +
Best to create a SAMBA password
 +
sudo useradd sambauser
 +
sudo passwd sambauser
 +
cat /etc/passwd
 +
sudo smbpasswd -a sambauser
 +
 
 +
Anytime you modify /etc/samba/smb.conf
 +
sudo restart smbd (unknown?)
 +
sudo start smbd
 +
sudo restart nmbd
 +
 
 +
=SAMBA Part 4 of 4=
 +
==Test1 Access the SAMBA server from Ubuntu client==
 +
 
 +
=FSTAB for SAMBA=
 +
[http://www.youtube.com/watch?v=EXv_N1atY50&feature=related Editing the FSTAB pt1]
 +
[http://www.youtube.com/watch?v=mhQUuB-o6wc&feature=related Editing the FSTAB pt2]
 +
[http://www.youtube.com/watch?v=LUpczMJVfUU&feature=related Editing the FSTAB pt3]
 +
 
 +
[[#top|top]]
 +
 
 +
==FSTAB SHARE configure==
 +
see [http://wiki.freegeek.org/index.php/User:Scott/02 Mount HDD] to mount a hard-drive
 +
 +
sudo mount to see what is mounted
 +
sudo mount -a to mount all entries in fstab
 +
 
 
  gksudo gedit /etc/fstab
 
  gksudo gedit /etc/fstab
 +
select Edit -> Preferences -> Editor
 +
create a backup copy before saving file
  
 +
==Example 1. Share on Linux==
 +
[path to share]    [mount point] [file-sys] [options]                 
 +
//IPAddress/share  /mnt/sjnSAMBA  cifs    users,auto,credentials=/sjnLinuxCredentials.txt, (cont)
 +
  noexec,noperm 0 0
 
   
 
   
 +
sjnLinuxCredentials.txt file to be owned by root (permissions 400) and contain two lines:
 +
username = samba_user
 +
password = samba user password
 +
 +
Example 2. Share on Windows
 +
[path to share]  [mount point] [file-sys]  [options]            [dump][fsck order]
 +
//win_box/share  /mnt/sjnSAMBA  smbfs      rw,credentials=/sjnWinboxCredentials.txt 0 0
 +
NOTE: add username=share.password= to options list on fstab line
  
 +
==File System Category==
 +
#File Systems [auto] [ext4] [jfs] [reiser4] [swap] [iso9660] [FAT 32] [NTFS]
 +
#Note [ntfs-3g]necessary for write access
 +
 +
#Network Types - nfs, smb, cifs
 
   
 
   
 +
==List UUID - Universal Unique Identifier==
 +
sudo blkid
 +
ls -l /dev/disk/by-uuid
 +
 +
[[#top|top]]
  
 
=Ubuntu Network Configuration Files - Part 1 of 3=
 
=Ubuntu Network Configuration Files - Part 1 of 3=

Latest revision as of 01:01, 12 January 2012

   Network Troubleshooting
--------------------------------
Home Page      user:scott
Tech Support   user:scott/02
Dir & Files    user:scott/03
Network        user:scott/04
Troubleshoot   user:scott/05
Laptops        user:scott/06
Resources      user:scott/07
Notes          user:scott/08 

Template:TOC limit

top

Reset Modem and Router

Unplug Modem and Router
Reset Modem and Router (paper clip)
Reboot Machine

Is Browser Off-line?
Is cable plugged in?

top

Does computer recognize the Adapter?

Are drivers compatable with Umbuntu?

lspci

lspci - Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 01)

lsusb

lsusb - Bus 001 Device 003: ID 13b1:0026 Linksys

top

Troubleshoot Network from CMD line

ifconfig

ifconfig

eth0  Link encap:Ethernet  HWaddr 00:17:08:5f:dc:73  
      inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
wlan0 Link encap:Ethernet  HWaddr 00:18:39:1d:31:d0  
      inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0

iwconfig

iwconfig

wlan0  IEEE 802.11bg  ESSID:"Karen's Wireless Network"  
       Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:01:FE:AB:AC

top

Ping Test

ping localhost 127.0.0.1

ping gateway (route -n)

ping 8.8.8.8 (google.com)
ping well.com
traceroute well.com (if installed)

DHCP Discover

sudo dhclient

Listening on LPF/eth0/00:17:08:5f:dc:73
Sending on   LPF/eth0/00:17:08:5f:dc:73
DHCP-REQUEST of 192.168.1.8 on eth0 to 255.255.255.255 port 67
DHCPA-CK of 192.168.1.8 from 192.168.1.1
bound to 192.168.1.8 -- renewal in 36968 seconds.

DNS (view records)

dig well.com (DNS NS + A records no MX records)

View Open Ports

nmap -P 0 localhost (sudo apt-get install nmap)

View Open TCP/IP Network Connections

lsof -i    (domain names)
lsof -i -n (ip address)

top

Troubleshoot Network using Network Tools

System -> Administration -> Network Tools

Devices Tab

loopback Interface (lo) 
Protocol IPv4 - 127.0.0.1
Hardware address: Loopback
 
Ethernet Interface (eth0)         
Protocol IPv4  - 192.168.1.x
Hardware address: 00:17:08:5f:dc:73
Wireless Interface (wlan0)         
Protocol IPv4  - 192.168.1.x
Hardware address: 00:17:08:5f:dc:73

Ping Tab

ping 127.0.0.1

Netstat Tab

Determine gateway 192.168.1.x
ping gateway
ping 8.8.8.8 (google-dns)

Lookup Tab - DNS Records

lookup 208.17.81.205 (well.com)
lookup well.com (default information)
lookup well.com (Mailbox Exchange)
 

Traceroute Tab

traceroute 74.125.225.48 (google.com)
traceroute google.com
traceroute 208.17.81.205 (well.com)
traceroute well.com

Network Manager Enable

System -> Preferences -> Startup Applications
EDIT = nm-applet --sm-disable

top

Network Adapters we Recommend

PCI Adapter

AZIO AWD154B (802.11G Wireless PCI Adapter)

USB Adapter

Linksys Wireless-G USB Network Adapter with SpeedBooster v2

Dial-Up Configuration

Whizcoho – DIAL-UP

user = freegeek@whiz.to
pw = test123
Gresham Number: 503-465-4055
503 974-0040

503 647-5957 – support 
http://wiki.freegeek.org/index.php/Dialup_configuration
etc/ppp/pap-secrets
#	*	password
“bbooth76”	*	‘barbwies”

freegeek\@wiz\.to		*	test123
bbooth76\@whiz\.to	*	jlister

top

-----------------------

SSH

Generating a key pair

ssh-keygen -t dsa
http://support.suso.com/supki/SSH_Tutorial_for_Linux

some ssh commands

ssh -p 443 bob@oem (server listening on port 443)

NFS - Network File Sharing (install server)

YouTube-ServerSide

SettingUpNFS

top

install nfs-server

sudo apt-get install nfs-kernel-server

Create dir to export (share)

sudo mkdir FolderName (root)
umask = 0022 / permissions = 755
sudo chmod 777 file1

Create local settings such as ...

POSIX permissions (owner and group)

The most restrictive combo of Local and NFS permissions is what applies.

If a folder has full permissions locally (777)
but I export that folder as (ro) instead if (rw), 
My actual permissions are read-only.

Add dir you wish to share to /etc/exports file

cat /etc/exports
sudo nano /etc/exports
(add the following lines)

/dir/FolderName1 192.168.1.7/255.255.255.0(rw,sync)
/dir/FolderName2 x.x.x.x/x.x.x.x(ro,sync)

Export the file system

sudo exportfs -a

Restart the NFS daemon

sudo /etc/init.d/nfs-kernel-server restart

NFS - Network File Sharing (install client)

YouTube-ClientSide

Install client tools for mounting NFS file system

sudo apt-get install nfs-common

Mount network shares with nfs4

sudo mount -t nfs4 -o proto=tcp,port=2049 RemoteHostIP:/dir/ShareName LocalFolder
(LocalFolder on client)

top

SAMBA Part 1 of 4

  1. Samba-Part1
  2. Samba-Part2
  3. Samba-Part3
  4. Samba-Part4
SAMBA uses (SMB) "Session Message Block"
SAMBA uses (CIFS) "Common Internet File System"

Install SAMBA

sudo apt-get install samba 

Edit the Configuration File

[ALT + F2] then 
gksudo gedit/etc/samba/smb.conf
  
search for "workgroup" workgroup = WORKGROUP
personalized to something like workgroup = sjnWorkgroup

find "security = user" and uncomment
At bottom of Config file create a "share" such as ...

[sjnPUBLIC]
comment = Public files shared on "name of server"!
comment = Public files shared on bob scott (that's server bob and server scott)
path = /sjnPUBLIC
guest ok = yes (can browse without authentication)
browseable = yes
read only = yes
#create mask = 0000
directory mask = 0000
[sjnREADONLY-EXT4]
comment = Read-only share on bob
path = /sjnREADONLY-EXT4
guest ok = yes (can browse without authentication)
browseable = yes
read only = yes
create mask = 0000
directory mask = 0000
[sjnWRITEABLE-EXT4]
comment = Read-Write share on bob
path = /sjnWRITEABLE-EXT4
guest ok = yes (can browse without authentication)
browseable = yes
read only = no
create mask = 7777
directory mask = 7777

top

Create dir to match SAMBA shares "Name and Permission"

sudo mkdir -v /sjnPUBLIC 
sudo mkdir -v /sjnREADONLY-EXT4
sudo mkdir -v /sjnWRITEABLE-EXT4

Change file permissions to match the config file

sudo chmod 777 /sjnWRITEABLE-EXT4

SAMBA Part 2 of 4

Samba-Part2

Mount necessary partitions and devices

Mount necessary partitions and devices in /etc/fstab 
(unless they are already mounted)

Not necessary if you are only sharing files on the default ...
Ubuntu Linux ext4 root (/)

Is necessary if you want to auto-mount NTFS partitions to share on network

SAMBA Part 3 of 4

Samba-Part3

After modifying files in /etc - restart the daemon

Best to create a SAMBA password
sudo useradd sambauser
sudo passwd sambauser
cat /etc/passwd
sudo smbpasswd -a sambauser
Anytime you modify /etc/samba/smb.conf 
sudo restart smbd (unknown?)
sudo start smbd
sudo restart nmbd

SAMBA Part 4 of 4

==Test1 Access the SAMBA server from Ubuntu client==

FSTAB for SAMBA

Editing the FSTAB pt1
Editing the FSTAB pt2
Editing the FSTAB pt3

top

FSTAB SHARE configure

see Mount HDD to mount a hard-drive

sudo mount to see what is mounted
sudo mount -a to mount all entries in fstab
gksudo gedit /etc/fstab
select Edit -> Preferences -> Editor
create a backup copy before saving file

Example 1. Share on Linux

[path to share]    [mount point] [file-sys] [options]      	             
//IPAddress/share  /mnt/sjnSAMBA   cifs    users,auto,credentials=/sjnLinuxCredentials.txt, (cont)
  noexec,noperm 0 0

sjnLinuxCredentials.txt file to be owned by root (permissions 400) and contain two lines:
username = samba_user
password = samba user password
Example 2. Share on Windows
[path to share]  [mount point] [file-sys]  [options]            [dump][fsck order]
//win_box/share  /mnt/sjnSAMBA  smbfs      rw,credentials=/sjnWinboxCredentials.txt 0 0
NOTE: add username=share.password= to options list on fstab line

File System Category

#File Systems [auto] [ext4] [jfs] [reiser4] [swap] [iso9660] [FAT 32] [NTFS]
#Note [ntfs-3g]necessary for write access

#Network Types - nfs, smb, cifs

List UUID - Universal Unique Identifier

sudo blkid
ls -l /dev/disk/by-uuid

top

Ubuntu Network Configuration Files - Part 1 of 3

config-Part1 config-Part2 config-Part3