Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:handbook:networkconf [2010/07/08 15:14] – external edit 127.0.0.1 | en:handbook:networkconf [2019/10/16 17:11] (current) – [Wifi-box - Graphical configuration of the wireless network (SliTaz 4.0 and 5.0 Weekly)] mojo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Network Configuration ====== | ====== Network Configuration ====== | ||
| + | <note important> | ||
| ===== 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 // | + | 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 // |
| < | < | ||
| Line 11: | Line 12: | ||
| < | < | ||
| - | The system wide network configuration file is /// | + | The system wide network configuration file is /// |
| - | + | ||
| - | ===== Netbox - Configure the network ===== | + | ===== Netbox - Configure the network |
| 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/ | 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/ | ||
| Line 23: | Line 24: | ||
| < | < | ||
| - | ===== Wifibox | + | <note important> |
| + | wifi-box was renamed to wifibox \\ | ||
| + | SliTaz Panel/ | ||
| + | SliTaz-5.0 offers slitaz-configs wifi configuration using ncurses interface. | ||
| + | </ | ||
| + | ===== Wifi-box | ||
| - | Wifibox | + | Wifi-box |
| {{: | {{: | ||
| 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: | ||
| + | |||
| + | < | ||
| ===== / | ===== / | ||
| The file /// | The file /// | ||
| - | < | + | < |
| 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 /// | To disable udhcpc on eth0 or modify the interface (eg eth1), you must edit the /// | ||
| - | <code> | + | <file> |
| # Dynamic IP address. | # Dynamic IP address. | ||
| # Enable/ | # Enable/ | ||
| DHCP=" | DHCP=" | ||
| - | </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 " | You can specify a fixed IP address to configure at boot time by using the value " | ||
| - | <code> | + | <file> |
| # Static IP address. | # Static IP address. | ||
| # Enable/ | # Enable/ | ||
| STATIC=" | STATIC=" | ||
| - | </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=" | IP=" | ||
| Line 87: | Line 96: | ||
| DNS_SERVER=" | DNS_SERVER=" | ||
| - | </code> | + | </file> |
| + | |||
| + | ===== Static routes ===== | ||
| + | Static routes can be added at any time via the route add command: | ||
| + | |||
| + | < | ||
| + | route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.21.2 | ||
| + | </ | ||
| + | |||
| + | The static route will remain active until the next reboot. | ||
| + | In order to make these routes persistent, add them to / | ||
| + | |||
| ===== PPPoE connection kernel-mode ===== | ===== PPPoE connection kernel-mode ===== | ||
| Line 93: | Line 114: | ||
| PPPoE connection in kernel-mode needs 2 files. The first file is /// | PPPoE connection in kernel-mode needs 2 files. The first file is /// | ||
| - | <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 /// | Now you have to configure /// | ||
| - | <code> | + | <file> |
| # client | # client | ||
| " | " | ||
| - | </code> | + | </file> |
| The config file / | The config file / | ||
| - | < | + | < |
| </ | </ | ||
| On an installed system you can start pppd on each boot using the local startup script: /// | On an installed system you can start pppd on each boot using the local startup script: /// | ||
| - | ===== Enable Dial-up | + | ===== Ethernet PPPoE ADSL Modem - PPPoE with rp-pppoe ===== |
| - | To set an ASDL protocol via PPPoE, SliTaz provides the utilities package // | + | 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 // |
| Line 154: | Line 175: | ||
| < | < | ||
| </ | </ | ||
| + | |||
| + | To check the connection status: | ||
| + | |||
| + | < | ||
| ===== 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 /// | On an installed system you just need to add the module_name to the variable LOAD_MODULES in /// | ||
| + | <note important> | ||
| + | SliTaz-4.0 and newer: / | ||
| + | iptables rules are moved from / | ||
| + | Reference: http:// | ||
| + | </ | ||
| ===== Manage the Firewall (firewall) using Iptables ===== | ===== Manage the Firewall (firewall) using Iptables ===== | ||
| Line 189: | Line 219: | ||
| To enable/ | To enable/ | ||
| - | <code> | + | <file> |
| # Enable/ | # Enable/ | ||
| KERNEL_SECURITY=" | KERNEL_SECURITY=" | ||
| - | </code> | + | </file> |
| And to activate/ | And to activate/ | ||
| - | <code> | + | <file> |
| # Enable/ | # Enable/ | ||
| IPTABLES_RULES=" | IPTABLES_RULES=" | ||
| - | </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/ | # Netfilter/ | ||
| # This shell function is included in / | # This shell function is included in / | ||
| Line 240: | Line 270: | ||
| } | } | ||
| - | </code> | + | </file> |