Site Tools


linux:general:network

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
linux:general:network [2017/04/28 11:39] lunetikklinux:general:network [2018/12/20 17:42] – Discussion status changed lunetikk
Line 8: Line 8:
 |  25  |  SMTP  |  |  25  |  SMTP  | 
 |  80  |  HTTP  | |  80  |  HTTP  |
-|  137 + 139  |  TCP/UDP - SMB/Samba  |+|  111 + 2049  |  TCP/UDP - NFS  | 
 +|  137 + 139 + 445   TCP/UDP - SMB/Samba  |
 |  443  |  HTTPS  | |  443  |  HTTPS  |
 |  8080  |  Proxy  | |  8080  |  Proxy  |
Line 43: Line 44:
 </code> </code>
  
 +=== Set proxy for apt ===
  
-==== Change your IP ====+Open apt.conf 
 +<code> 
 +vi /etc/apt/apt.conf 
 +</code> 
 + 
 +Set proxy 
 +<code> 
 +Acquire::http::Proxy "http://127.0.0.1:8080"; 
 +Acquire::https::Proxy "https://127.0.0.1:8080"; 
 +</code> 
 + 
 +=== Set proxy for wget === 
 + 
 +Open wgetrc 
 +<code> 
 +vi ~/.wgetrc 
 +</code> 
 + 
 +Set proxy 
 +<code> 
 +use_proxy=on 
 +http_proxy=127.0.0.1:8080 
 +https_proxy=127.0.0.1:8080 
 +http_proxy=http://username:password@proxy_host:proxy_port 
 +https_proxy=https://username:password@proxy_host:proxy_port 
 +</code> 
 + 
 +OR 
 + 
 +<code> 
 +wget <URL> -e use_proxy=on -e http_proxy=127.0.0.1:8080 
 +</code> 
 + 
 +==== Change your IP (Ubuntu) ====
  
 Edit /etc/network/interfaces: Edit /etc/network/interfaces:
Line 64: Line 99:
 <code> <code>
 /etc/init.d/networking restart /etc/init.d/networking restart
 +</code>
 +<code>
 +ifdown eth0 && ifup eth0
 </code> </code>
  
 +==== Change your IP (SLES11/12) ====
 +
 +Edit /etc/sysconfig/network/ifcfg-eth0:
 +<code>
 +sudo vi /etc/sysconfig/network/ifcfg-eth0
 +</code>
 +and add
 +<code>
 +DEVICE='eth0'
 +BOOTPROTO='static'
 +STARTMODE='auto'
 +USERCONTROL='no'
 +BROADCAST=''
 +ETHTOOL_OPTIONS=''
 +IPADDR='10.0.0.2'
 +MTU=''
 +NAME=''
 +NETMASK='255.255.255.0'
 +NETWORK=''
 +REMOTE_IPADDR=''
 +</code>
 +
 +Edit gateway /etc/sysconfig/network/routes:
 +<code>
 +sudo vi /etc/sysconfig/network/routes
 +</code>
 +and add
 +<code>
 +default 10.0.0.1 - eth0
 +#default 10.0.0.1 - -
 +</code>
 +
 +Restart your networkinterface
 +
 +SLES11
 +<code>
 +/etc/init.d/networking restart
 +</code>
 +
 +SLES12
 +<code>
 +ifdown eth0 && ifup eth0
 +</code>
  
 ==== Join a domain and change hostname ==== ==== Join a domain and change hostname ====
Line 89: Line 170:
 hostname –F /etc/hostname hostname –F /etc/hostname
 </code> </code>
 +
 +==== Troubleshooting ====
 +
 +=== resolv.conf is empty ===
 +
 +<code> dpkg-reconfigure resolvconf </code>
 +
 +=== Cant do ifdown/ifup ===
 +
 +<code>
 +# ifdown eth0 && ifup eth0
 +/etc/resolvconf/update-libc.d/sendmail: 7: .: Can't open /usr/share/sendmail/dynamic
 +run-parts: /etc/resolvconf/update-libc.d/sendmail exited with return code 2
 +run-parts: /etc/resolvconf/update.d/libc exited with return code 1
 +/etc/resolvconf/update-libc.d/sendmail: 7: .: Can't open /usr/share/sendmail/dynamic
 +run-parts: /etc/resolvconf/update-libc.d/sendmail exited with return code 2
 +run-parts: /etc/resolvconf/update.d/libc exited with return code 1
 +/etc/network/if-up.d/sendmail: 44: .: Can't open /usr/share/sendmail/dynamic
 +run-parts: /etc/network/if-up.d/sendmail exited with return code 2
 +</code>
 +
 +This should fix it:
 +<code> apt-get --purge remove sendmail sendmail-base sendmail-bin </code>
 +
 \\ \\
 \\ \\
-~~DISCUSSION~~+~~DISCUSSION:closed~~
linux/general/network.txt · Last modified: 2022/12/16 10:51 by lunetikk