This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:general:network [2017/04/28 11:39] – lunetikk | linux:general:network [2019/04/16 14:19] – lunetikk | ||
---|---|---|---|
Line 8: | Line 8: | ||
| 25 | SMTP | | | 25 | SMTP | | ||
| 80 | HTTP | | | 80 | HTTP | | ||
- | | 137 + 139 | TCP/UDP - SMB/ | + | | 111 + 2049 | TCP/UDP - NFS | |
+ | | 123 | UDP - NTP | ||
+ | | 137 + 139 + 445 | ||
| 443 | HTTPS | | | 443 | HTTPS | | ||
| 8080 | Proxy | | | 8080 | Proxy | | ||
Line 43: | Line 45: | ||
</ | </ | ||
+ | === Set proxy for apt === | ||
- | ==== Change your IP ==== | + | Open apt.conf |
+ | < | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | Set proxy | ||
+ | < | ||
+ | Acquire:: | ||
+ | Acquire:: | ||
+ | </ | ||
+ | |||
+ | === Set proxy for wget === | ||
+ | |||
+ | Open wgetrc | ||
+ | < | ||
+ | vi ~/.wgetrc | ||
+ | </ | ||
+ | |||
+ | Set proxy | ||
+ | < | ||
+ | use_proxy=on | ||
+ | http_proxy=127.0.0.1: | ||
+ | https_proxy=127.0.0.1: | ||
+ | http_proxy=http:// | ||
+ | https_proxy=https:// | ||
+ | </ | ||
+ | |||
+ | OR | ||
+ | |||
+ | < | ||
+ | wget <URL> -e use_proxy=on -e http_proxy=127.0.0.1: | ||
+ | </ | ||
+ | |||
+ | ==== Change your IP (Ubuntu) | ||
Edit / | Edit / | ||
Line 64: | Line 100: | ||
< | < | ||
/ | / | ||
+ | </ | ||
+ | < | ||
+ | ifdown eth0 && ifup eth0 | ||
</ | </ | ||
+ | ==== 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 89: | Line 171: | ||
hostname –F / | hostname –F / | ||
</ | </ | ||
+ | |||
+ | ==== 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 | ||
+ | |||
+ | </ | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | ==== Troubleshooting ==== | ||
+ | |||
+ | === resolv.conf is empty === | ||
+ | |||
+ | < | ||
+ | |||
+ | === Cant do ifdown/ifup === | ||
+ | |||
+ | < | ||
+ | # ifdown eth0 && ifup eth0 | ||
+ | / | ||
+ | run-parts: / | ||
+ | run-parts: / | ||
+ | / | ||
+ | run-parts: / | ||
+ | run-parts: / | ||
+ | / | ||
+ | run-parts: / | ||
+ | </ | ||
+ | |||
+ | This should fix it: | ||
+ | < | ||
+ | |||
\\ | \\ | ||
\\ | \\ | ||
- | ~~DISCUSSION~~ | + | ~~DISCUSSION:closed~~ |