Differences
This shows you the differences between two versions of the page.
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 hosts. Named 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 ~/ | cat ~/ | ||
- | }}} | + | </ |
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 | ||
- | }}} | + | </ |
- | To get ssh-add automatically setup: | + | To get ssh-add automatically setup |
- | karlcode.owtelse.com/ | + | [[karlcode.owtelse.com/ |
+ | |||
+ | To connect to an ssh server using a specific key: | ||
+ | <code bash> | ||
+ | ssh -i work_computer [email protected] | ||
+ | </ | ||
+ | |||
+ | 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> ~/ | ||
+ | |||
+ | To change basic ssh settings such as disabling password authentication go to | ||
+ | this file. | ||
+ | <code bash> / | ||
+ | |||
+ | ===== 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 | ||
- | }}} | + | </ |
To enable a network apadter: | To enable a network apadter: | ||
- | {{{ | + | <code bash> |
sudo ip link set up enp0s31f6 | sudo ip link set up enp0s31f6 | ||
- | }}} | + | </ |
Notes from [[http:// | Notes from [[http:// | ||
- | 1. Find the following information using ifconfig and ethtool: | + | ifconfig and ethtool |
- | - MAC Address: | + | |
- | - IP Address: 192.168.1.14 | + | |
- | - Network Address: This is some thing you can calcated using the mask | + | |
- | - Simplex, half or full - full | + | |
- | - 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 |
- | }}} | + | </ |
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 | ||
- | }}} | + | </ |
Statistics on your network: | Statistics on your network: | ||
- | {{{ | + | <code bash> |
netstat -s | netstat -s | ||
- | }}} | + | </ |
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 | ||
- | }}} | + | </ |
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> | ||
/ | / | ||
+ | </ | ||
- | netstat -r shows the routing table. | + | To see the routing table: |
+ | <code bash> | ||
+ | netstat -r | ||
+ | </ | ||
+ | ===== Name Resolution ===== | ||
- | = Name Resolution = | + | Ok, cool, I'm finding shit |
- | + | [[https:// | |
- | Ok, cool, I'm finding shit with this. | + | |
- | https:// | + | |
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: | + | |
+ | To look at link information: | ||
+ | <code bash> | ||
+ | nmcli dev wifi | ||
+ | </ | ||
+ | |||
+ | ===== VPN ===== | ||
+ | |||
+ | When needing to set up a VPN server use OpenVPN and use the roadwarrior script | ||
+ | [[https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | When connecting to the open VPN server make sure to check the box "Use connection only for resources on this network" | ||
+ | |||
+ | <code bash> | ||
+ | sudo ip route | ||
+ | </ | ||
+ | |||