Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking [2019/02/23 20:05]
paul created
networking [2019/03/31 14:49] (current)
Line 1: Line 1:
-Added the diskstation to the hostsNamed it disksta     +====== Networking ====== 
-/etc/hosts/+ 
 +Here is some general networking information
 + 
 +===== SSH Keys =====
  
 To upload an ssh key to a server: To upload an ssh key to a server:
-{{{+<code bash>
 cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys' cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
-}}}+</code>
  
 To cat a file contents to the sytem clipboard:  To cat a file contents to the sytem clipboard: 
-{{{+<code bash>
 cat file | xclip -selection clipboard cat file | xclip -selection clipboard
-}}}+</code>
  
-To get ssh-add automatically setup: +To get ssh-add automatically setup 
-karlcode.owtelse.com/blog/2015/06/27/passwordless-ssh-on-synology/+[[karlcode.owtelse.com/blog/2015/06/27/passwordless-ssh-on-synology/|see here]]. 
 + 
 +To connect to an ssh server using a specific key: 
 +<code bash> 
 +ssh -i work_computer [email protected] 
 +</code> 
 + 
 +The -i following by a path to the public key you want to use. 
 + 
 +Authorized keys are stored in the following file.This is where you add a key with no new 
 +lines! One key per line following by the hostname. 
 +<code bash> ~/.ssh/authorized_users </code> 
 + 
 +To change basic ssh settings such as disabling password authentication go to 
 +this file. 
 +<code bash> /etc/ssh/sshd_config </code> 
 + 
 +===== Network Adapters =====
  
 To disable a network adapter.  To disable a network adapter. 
-{{{+<code bash>
 sudo ip link set down enp0s31f6 sudo ip link set down enp0s31f6
-}}}+</code>
  
 To enable a network apadter: To enable a network apadter:
-{{{+<code bash>
 sudo ip link set up enp0s31f6 sudo ip link set up enp0s31f6
-}}}+</code>
  
 Notes from [[http://bit.ly/2fyR8TF|Steve Gordon's Lab]]: Notes from [[http://bit.ly/2fyR8TF|Steve Gordon's Lab]]:
  
-1. Find the following information using ifconfig and ethtool: +ifconfig and ethtool are great tools that can give you the following info
-MAC Address:   50:7b:9d:f0:bf:3c   +  MAC Address:   50:7b:9d:f0:bf:3c   
-IP Address: 192.168.1.14 +  IP Address: 192.168.1.14 
-Network Address: This is some thing you can calcated using the mask +  Network Address: This is some thing you can calcated using the mask 
-Simplex, half or full - full +  Simplex, half or full - full 
-Speed 1000+  Speed 1000
  
 Some commands we used: Some commands we used:
  
 This gives us statistics. This gives us statistics.
-{{{ +<code bash> 
-    ethtool -S eth0 +ethtool -S eth0 
-}}}+</code>
  
 This changes the speed of our port! The duplex command needs to be sent in also This changes the speed of our port! The duplex command needs to be sent in also
-{{{+<code bash>
 ethtool -s eth0 speed 100 duplex full ethtool -s eth0 speed 100 duplex full
-}}}+</code>
  
 Statistics on your network: Statistics on your network:
-{{{+<code bash>
 netstat -s  netstat -s 
-}}}+</code>
  
 How does my computer discover the hardware address of other computers. Theres a How does my computer discover the hardware address of other computers. Theres a
Line 58: Line 78:
  
 We want to see who is currently connected to us: We want to see who is currently connected to us:
-{{{+<code bash>
 netstat -t  netstat -t 
-}}}+</code>
  
 To get a feel of what ports are in use read the file: To get a feel of what ports are in use read the file:
 +<code bash>
 /etc/services /etc/services
 +</code>
  
-netstat -r shows the routing table.+To see the routing table
 +<code bash> 
 +netstat -r 
 +</code>
  
 +===== Name Resolution =====
  
-= Name Resolution = +Ok, cool, I'm finding shit 
- +[[https://community.netgear.com/t5/Wireless-N-Routers/Can-t-access-local-hosts-by-name/td-p/1032440|with this.]]
-Ok, cool, I'm finding shit with this.  +
-https://community.netgear.com/t5/Wireless-N-Routers/Can-t-access-local-hosts-by-name/td-p/1032440+
  
 Avahi, is a name resolution service that broadcasts out the name of the machine. It Avahi, is a name resolution service that broadcasts out the name of the machine. It
Line 83: Line 107:
 dev-laptop.local and td1.local and if i'm over vpn, use the ips. Easy peasy.  dev-laptop.local and td1.local and if i'm over vpn, use the ips. Easy peasy. 
  
-= Wireless = +===== Wireless ===== 
-To look at link information: nmcli dev wifi+ 
 +To look at link information:  
 +<code bash> 
 +nmcli dev wifi 
 +</code> 
 + 
 +===== VPN ===== 
 + 
 +When needing to set up a VPN server use OpenVPN and use the roadwarrior script 
 +[[https://github.com/Nyr/openvpn-install|provided here]]. 
 + 
 +{{:open_vpn.png|}} 
 + 
 +When connecting to the open VPN server make sure to check the box "Use connection only for resources on this network". This allows the connecting computer to retain its original default gateway and not mess up the internet connection. To test route do: 
 + 
 +<code bash> 
 +sudo ip route 
 +</code> 
 + 
  
  • networking.1550952335.txt.gz
  • Last modified: 2019/02/23 20:05
  • by paul