This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:general:network [2018/01/03 13:16] – lunetikk | linux:general:network [2022/12/16 10:51] (current) – lunetikk | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| | 25 | SMTP | | | 25 | SMTP | | ||
| | 80 | HTTP | | | 80 | HTTP | | ||
| - | | 111 + 2049 | NFS | | + | | 111 + 2049 | |
| - | | 137 + 139 | TCP/UDP - SMB/ | + | | 123 | UDP - NTP | |
| + | | 137 + 139 + 445 | ||
| | 443 | HTTPS | | | 443 | HTTPS | | ||
| | 8080 | Proxy | | | 8080 | Proxy | | ||
| Line 69: | Line 70: | ||
| http_proxy=127.0.0.1: | http_proxy=127.0.0.1: | ||
| https_proxy=127.0.0.1: | https_proxy=127.0.0.1: | ||
| + | http_proxy=http:// | ||
| + | https_proxy=https:// | ||
| </ | </ | ||
| Line 77: | Line 80: | ||
| </ | </ | ||
| - | ==== Change your IP ==== | + | ==== Change your IP (Ubuntu < 16) ==== |
| Edit / | Edit / | ||
| Line 97: | Line 100: | ||
| < | < | ||
| / | / | ||
| + | </ | ||
| + | < | ||
| + | ifdown eth0 && ifup eth0 | ||
| </ | </ | ||
| + | ==== Change your IP (Ubuntu > 16) ==== | ||
| + | |||
| + | Edit / | ||
| + | < | ||
| + | sudo vi / | ||
| + | </ | ||
| + | and add | ||
| + | < | ||
| + | network: | ||
| + | version: 2 | ||
| + | renderer: networkd | ||
| + | ethernets: | ||
| + | ens3: | ||
| + | dhcp4: no | ||
| + | addresses: | ||
| + | - 10.0.0.2/8 | ||
| + | gateway4: 10.0.0.1 | ||
| + | nameservers: | ||
| + | addresses: [8.8.8.8, 8.8.4.4] | ||
| + | </ | ||
| + | Apply the new IP config | ||
| + | < | ||
| + | sudo netplan apply | ||
| + | </ | ||
| + | |||
| + | ==== Change your IP (SLES11/12) ==== | ||
| + | |||
| + | Edit / | ||
| + | < | ||
| + | sudo vi / | ||
| + | </ | ||
| + | and add | ||
| + | < | ||
| + | DEVICE=' | ||
| + | BOOTPROTO=' | ||
| + | STARTMODE=' | ||
| + | USERCONTROL=' | ||
| + | BROADCAST='' | ||
| + | ETHTOOL_OPTIONS='' | ||
| + | IPADDR=' | ||
| + | MTU='' | ||
| + | NAME='' | ||
| + | NETMASK=' | ||
| + | NETWORK='' | ||
| + | REMOTE_IPADDR='' | ||
| + | </ | ||
| + | |||
| + | Edit gateway / | ||
| + | < | ||
| + | sudo vi / | ||
| + | </ | ||
| + | and add | ||
| + | < | ||
| + | default 10.0.0.1 - eth0 | ||
| + | #default 10.0.0.1 - - | ||
| + | </ | ||
| + | |||
| + | Restart your networkinterface | ||
| + | |||
| + | SLES11 | ||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | SLES12 | ||
| + | < | ||
| + | ifdown eth0 && ifup eth0 | ||
| + | </ | ||
| ==== Join a domain and change hostname ==== | ==== Join a domain and change hostname ==== | ||
| Line 118: | Line 192: | ||
| sudo vi / | sudo vi / | ||
| </ | </ | ||
| - | Reload | + | Set your hostname |
| < | < | ||
| hostname –F / | hostname –F / | ||
| </ | </ | ||
| + | New syntax to set a hostname | ||
| + | < | ||
| + | hostnamectl set-hostname " | ||
| + | </ | ||
| + | Show hostname | ||
| + | < | ||
| + | hostnamectl | ||
| + | </ | ||
| + | |||
| + | ==== Tools to monitor traffic ==== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | < | ||
| + | |||
| + | #bmon - shows multiple interfaces at once | ||
| + | apt-get install bmon | ||
| + | |||
| + | #tcptrack - Tells how much bandwidth is being used and also what protocol (service/ | ||
| + | apt-get install tcptrack | ||
| + | |||
| + | #nload - Separated view for down and upload | ||
| + | apt-get install nload | ||
| + | |||
| + | #iftop | ||
| + | apt-get install iftop | ||
| + | |||
| + | #ethstatus | ||
| + | apt-get install ethstatus | ||
| + | |||
| + | </ | ||
| + | bmon: {{: | ||
| + | |||
| + | tcptrack: {{: | ||
| + | |||
| + | nload: {{: | ||
| + | |||
| + | iftop: {{: | ||
| + | |||
| + | ethstatus: {{: | ||
| ==== Troubleshooting ==== | ==== Troubleshooting ==== | ||
| Line 148: | Line 262: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | ~~DISCUSSION~~ | + | ~~DISCUSSION:closed~~ |