SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:handbook:networkconf [2010/07/08 17:14]
127.0.0.1 external edit
en:handbook:networkconf [2019/10/16 19:11] (current)
mojo [Wifi-box - Graphical configuration of the wireless network (SliTaz 4.0 and 5.0 Weekly)]
Line 1: Line 1:
 ====== Network Configuration ====== ====== Network Configuration ======
 +<note important>​SliTaz Panel/​Network replaces netbox for SliTaz-4.0 and newer</​note>​
  
 ===== About the Network ===== ===== About the Network =====
  
-By default SliTaz starts a DHCP client (udhcpc) on eth0 at boot time. If your network card has been identified as an eth0 interface and you use a router, your connection should already be working. DHCP is dynamically configured, on each boot the client asks for a new IP address from the DHCP server which is integrated into the router, or on another computer. If you need a static IP, you can directly edit config files or use the GUI //netbox// available from the //​System ​menu --> System// tools. In a terminal or a Linux console, you can list all available network interfaces with the command //​ifconfig//​ followed by the //-a// option:+By default SliTaz starts a DHCP client (udhcpc) on eth0 at boot time. If your network card has been identified as an eth0 interface and you use a router, your connection should already be working. DHCP is dynamically configured, on each boot the client asks for a new IP address from the DHCP server which is integrated into the router, or on another computer. If you need a static IP, you can directly edit config files or use the //Network// tab at //​System ​Tools// ​-> //Slitaz Panel//. In a terminal or a Linux console, you can list all available network interfaces with the command //​ifconfig//​ followed by the //-a// option:
  
 <​code>​ $ ifconfig -a </​code>​ <​code>​ $ ifconfig -a </​code>​
Line 11: Line 12:
 <​code>​ $ route </​code>​ <​code>​ $ route </​code>​
  
-The system wide network configuration file is ///​etc/​network.conf//​. It can be graphically configured ​with netbox ​or directly edited by the root administrator. +The system wide network configuration file is ///​etc/​network.conf//​. It can be graphically configured ​at the //Network// tab on SliTaz Panel or directly edited by the root administrator. 
- +  
-===== Netbox - Configure the network =====+===== Netbox - Configure the network ​(SliTaz 3.0 and older) ​=====
  
 Netbox is a small GTK+ application to configure a network interface using DCHP or a fixed (static) IP address. The tabs can be used to start/stop the connections and automatically change the values in the system files. Netbox provides a system wide tab from which you can directly edit network configuration files, and tabs to configure PPP/PPPoE username/​passwords. Servers such as SSH, DHCP, PXE, DNS, etc can also be configured and it's possible to create your own virtual private network (VPN) using the tools provided. ​ Netbox is a small GTK+ application to configure a network interface using DCHP or a fixed (static) IP address. The tabs can be used to start/stop the connections and automatically change the values in the system files. Netbox provides a system wide tab from which you can directly edit network configuration files, and tabs to configure PPP/PPPoE username/​passwords. Servers such as SSH, DHCP, PXE, DNS, etc can also be configured and it's possible to create your own virtual private network (VPN) using the tools provided. ​
Line 23: Line 24:
 <​code>​ $ subox netbox </​code>​ <​code>​ $ subox netbox </​code>​
  
-===== Wifibox ​- Graphical configuration of the wireless network =====+<note important>​SliTaz-4.0 and newer: \\ 
 +wifi-box was renamed to wifibox \\ 
 +SliTaz Panel/​Network/​Wireless offers same configuration \\ 
 +SliTaz-5.0 offers slitaz-configs wifi configuration using ncurses interface. 
 +</​note>​ 
 +===== Wifi-box ​- Graphical configuration of the wireless network ​(SliTaz 4.0 and 5.0 Weekly) ​=====
  
-Wifibox ​is small interface to configure a network connection (Wifi, WLAN, or Wireless). The '​Networks'​ tab displays a list of available networks, just double click on a network name to connect. If the network is secure, the key will then be sought. ​+Wifi-box ​is small interface to configure a network connection (Wifi, WLAN, or Wireless). The '​Networks'​ tab displays a list of available networks, just double click on a network name to connect. If the network is secure, the key will then be sought. ​
  
 {{:​en:​handbook:​image:​wifibox.png}} {{:​en:​handbook:​image:​wifibox.png}}
Line 35: Line 41:
   -   The card is not supported by Linux and a Windows driver must be installed via the Windows driver manager (tazndis).   -   The card is not supported by Linux and a Windows driver must be installed via the Windows driver manager (tazndis).
  
 +You can start wifi-box via a terminal:
 +
 +<​code>​ # wifi-box</​code>​
 ===== /​etc/​hostname - The hostname ===== ===== /​etc/​hostname - The hostname =====
  
 The file ///​etc/​hostname//​ sets the machine name. This is loaded at system startup with the command '​hostname',​ without an argument this command returns the current machine name: The file ///​etc/​hostname//​ sets the machine name. This is loaded at system startup with the command '​hostname',​ without an argument this command returns the current machine name:
  
-<​code>​ $ hostame ​</​code>​+<​code>​ $ hostname ​</​code>​
  
 To change the hostname, you can use the echo command or a text editor available on SliTaz (you must be root). Example using echo and the machine name kayam: To change the hostname, you can use the echo command or a text editor available on SliTaz (you must be root). Example using echo and the machine name kayam:
Line 57: Line 66:
 To disable udhcpc on eth0 or modify the interface (eg eth1), you must edit the ///​etc/​network.conf//​ file and place the value "​no"​ in the variable DHCP=: To disable udhcpc on eth0 or modify the interface (eg eth1), you must edit the ///​etc/​network.conf//​ file and place the value "​no"​ in the variable DHCP=:
  
-<code>+<file>
 # Dynamic IP address. # Dynamic IP address.
 # Enable/​disable DHCP client at boot time. # Enable/​disable DHCP client at boot time.
 DHCP="​no"​ DHCP="​no"​
-</code>+</file>
  
 ===== Static IP - Using a specific address ===== ===== Static IP - Using a specific address =====
Line 67: Line 76:
 You can specify a fixed IP address to configure at boot time by using the value "​yes"​ in the variable STATIC=: You can specify a fixed IP address to configure at boot time by using the value "​yes"​ in the variable STATIC=:
  
-<code>+<file>
 # Static IP address. # Static IP address.
 # Enable/​disable static IP at boot time. # Enable/​disable static IP at boot time.
 STATIC="​yes"​ STATIC="​yes"​
-</code>+</file>
  
 For the configuration to work, you must specify an IP address, its subnet mask, a default gateway (gateway) and DNS server to use. Example: For the configuration to work, you must specify an IP address, its subnet mask, a default gateway (gateway) and DNS server to use. Example:
  
  
-<code>+<file>
 # Set IP address, and netmask for a static IP. # Set IP address, and netmask for a static IP.
 IP="​192.168.0.6"​ IP="​192.168.0.6"​
Line 87: Line 96:
 DNS_SERVER="​192.168.0.1"​ DNS_SERVER="​192.168.0.1"​
  
-</code>+</file> 
 + 
 +===== Static routes ===== 
 +Static routes can be added at any time via the route add command: 
 + 
 +<​file>​ 
 +route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.21.2 
 +</​file>​ 
 + 
 +The static route will remain active until the next reboot.  
 +In order to make these routes persistent, add them to /​etc/​init.d/​local.sh 
 + 
  
 ===== PPPoE connection kernel-mode ===== ===== PPPoE connection kernel-mode =====
Line 93: Line 114:
 PPPoE connection in kernel-mode needs 2 files. The first file is ///​etc/​ppp/​options//​ where you must specify your login name: PPPoE connection in kernel-mode needs 2 files. The first file is ///​etc/​ppp/​options//​ where you must specify your login name:
  
-<code>+<file>
 plugin rp-pppoe.so plugin rp-pppoe.so
-name <your provider connection ID>+name <your_login>
 noipdefault noipdefault
 defaultroute defaultroute
Line 101: Line 122:
 mru 1492 mru 1492
 lock lock
-</code>+</file>
  
 Now you have to configure ///​etc/​ppp/​pap-secrets//​ or ///​etc/​ppp/​chap-secrets//:​ Now you have to configure ///​etc/​ppp/​pap-secrets//​ or ///​etc/​ppp/​chap-secrets//:​
  
  
-<code>+<file>
 # client  ​      ​server  ​      ​secret IP addresses # client  ​      ​server  ​      ​secret IP addresses
 "​your_login" ​      ​* ​              "​your_password"​ "​your_login" ​      ​* ​              "​your_password"​
-</code>+</file>
  
 The config file /​etc/​resolv.conf will be automatically loaded. Finished, you can now connect to the internet with pppd: The config file /​etc/​resolv.conf will be automatically loaded. Finished, you can now connect to the internet with pppd:
  
-<​code>​pppd eth0 +<​code> ​pppd eth0 
 </​code>​ </​code>​
  
 On an installed system you can start pppd on each boot using the local startup script: ///​etc/​init.d/​local.sh//​ On an installed system you can start pppd on each boot using the local startup script: ///​etc/​init.d/​local.sh//​
  
-===== Enable Dial-up ​Modem - PPPoE with rp-pppoe =====+===== Ethernet PPPoE ADSL Modem - PPPoE with rp-pppoe =====
  
-To set an ASDL protocol via PPPoE, SliTaz provides the utilities package //​rp-pppoe//​. Using pppoe-setup is a snap and you can quickly configure the network. If you use DCHP it's even easier, because the server from your ISP will take care of everything. If you do not have DHCP, you must first disable its use via DHCP="​no"​ in the configuration file ///​etc/​network.conf//​. It should be noted that to modify configuration files and system logs you must first become root. To install and change the variable DHCP with Nano (ctrl + X to save & exit):+This section is about setting up an ADSL Internet connection using an ethernet PPPoE modem in bridge mode. To set an ASDL protocol via PPPoE, SliTaz provides the utilities package //​rp-pppoe//​. Using pppoe-setup is a snap and you can quickly configure the network. If you use DCHP it's even easier, because the server from your ISP will take care of everything. If you do not have DHCP, you must first disable its use via DHCP="​no"​ in the configuration file ///​etc/​network.conf//​. It should be noted that to modify configuration files and system logs you must first become root. To install and change the variable DHCP with Nano (ctrl + X to save & exit):
  
  
Line 154: Line 175:
 <​code>​ # pppoe-stop ​ <​code>​ # pppoe-stop ​
 </​code>​ </​code>​
 +
 +To check the connection status:
 +
 +<​code>#​ pppoe-status</​code>​
  
 ===== Install network card driver ===== ===== Install network card driver =====
Line 168: Line 193:
 On an installed system you just need to add the module_name to the variable LOAD_MODULES in ///​etc/​rcS.conf//​ to load your module on each boot. On an installed system you just need to add the module_name to the variable LOAD_MODULES in ///​etc/​rcS.conf//​ to load your module on each boot.
  
 +<note important>​
 +SliTaz-4.0 and newer: /​etc/​firewall.conf is moved to /​etc/​slitaz/​firewall.conf \\
 +iptables rules are moved from /​etc/​init.d/​firewall.sh to /​etc/​slitaz/​firewall.sh \\
 +Reference: http://​hg.slitaz.org/​slitaz-tools/​rev/​769
 +</​note>​
 ===== Manage the Firewall (firewall) using Iptables ===== ===== Manage the Firewall (firewall) using Iptables =====
  
Line 189: Line 219:
 To enable/​disable options specific to the Kernel place "​yes"​ or "​no"​ in the variable KERNEL_SECURITY= : To enable/​disable options specific to the Kernel place "​yes"​ or "​no"​ in the variable KERNEL_SECURITY= :
  
-<code>+<file>
 # Enable/​disable kernel security at boot time. # Enable/​disable kernel security at boot time.
 KERNEL_SECURITY="​yes"​ KERNEL_SECURITY="​yes"​
-</code>+</file>
  
 And to activate/​deactivate the iptables rules, it is necessary to modify the IPTABLES_RULES= variable : And to activate/​deactivate the iptables rules, it is necessary to modify the IPTABLES_RULES= variable :
  
-<code>+<file>
 # Enable/​disable iptables rules. # Enable/​disable iptables rules.
 IPTABLES_RULES="​yes"​ IPTABLES_RULES="​yes"​
-</code>+</file>
  
 === Add, delete or modify the iptables rules === === Add, delete or modify the iptables rules ===
Line 207: Line 237:
 Here's an example of using iptables rules. It only allows connections on the localhost and the local network, and ports 80, 22, and 21 used by the web server HTTP, the SSH secure server and FTP respectively. All other incoming and outgoing connections are refused, so it's fairly restrictive. Here's an example of using iptables rules. It only allows connections on the localhost and the local network, and ports 80, 22, and 21 used by the web server HTTP, the SSH secure server and FTP respectively. All other incoming and outgoing connections are refused, so it's fairly restrictive.
  
-<code>+<file>
 # Netfilter/​iptables rules. # Netfilter/​iptables rules.
 # This shell function is included in /​etc/​init.d/​firewall.sh # This shell function is included in /​etc/​init.d/​firewall.sh
Line 240: Line 270:
  
 } }
-</code>+</file>
  
  
 
en/handbook/networkconf.1278602061.txt.gz · Last modified: 2010/08/17 21:45 (external edit)