1. Initializing the network card
In most cases, configuring your network card will be done automatically by
udev. This means that during every system boot your network card will be
detected, and the necessary modules will be loaded. If you want, you can load
your network card’s module manually by editing the /etc/sysconfig/modules
file and put the module in the blacklist by editing /etc/sysconfig/blacklist
.
Configuring any interface on your card will be the task of the netconfig
utility. Initializing your card ends here.
2. The netconfig utility
Configuring your network settings is done by the netconfig utility.
-
First, we have to give a name to your computer. The name must consist of at least two parts, separated by a dot (.).
-
In the next dialog, you should choose how your machine connects to the network. If you have an internal network card and an assigned IP address, gateway, and DNS, use static to enter these values. If your IP address is assigned by a DHCP server (commonly used by cable modem services, not equal to DSL services), select dhcp. In case you’ve got a DSL connection (eg. ADSL) choose the dsl option! Finally, if you do not have a network card, choose the lo choice. The lo is also the correct choice if you are using a PCMCIA network card.
When you set up the network, the first question will be the interface you want to set up. It is usually eth0, but it can differ when you set up wireless interfaces for example. If you set up a wireless card netconfig will also ask your ESSID and encryption key.
-
If you chose static, you must give your IP address, the netmask of your local network, your gateway address (you may leave it blank) and the IP address of your primary name server (you can add more nameservers later by editing the /etc/resolv.conf file) and then the configuration is finished.
-
If you chose dhcp, you can optionally give your dhcp hostname, however, netconfig will not ask more questions about your network, since all other data will be provided by the DHCP server.
-
If you chose dsl, you must give your username, something like someone@provider.net. Then you’ll have to specify the network interface (usually eth0) through which the ADSL connection script will try to communicate with your ADSL modem. Then enter your password twice.
-
If you chose lo, you don’t have to answer any questions.
-
-
Finally, netconfig will write all your network configuration files. If you want to edit your settings by hand, the interface information is stored in the /etc/sysconfig/network directory. There is only one file there called default in most cases. It’s because you can set up more than one profile. It’s very useful if you have a laptop so that you can set up options for all networks you use.
3. Basic firewall configuration
Frugalware comes with a firewall configuration working out of the box. This allows all outgoing connections, and incoming packets for established connections. It does not allow normal incoming packages for any ports. The firewall configuration is at /etc/sysconfig/firewall.
Note
|
You will not find this file if you have not installed iptables package as this is an iptables firewall. |
Let’s see an example: you would like to allow others to ssh into your computer. Edit /etc/sysconfig/firewall, remove the hashmark (#) from the beginning of the line under the # ssh description, and restart the firewall:
# service firewall restart
The same applies for Apache or any other services.
If you would like to have any advanced firewall settings, configure your firewall as root with iptables then save your config as root with:
# iptables-save > /etc/sysconfig/firewall
Warning
|
It will overwrite your existing configuration! It is strongly recommended to make a backup of /etc/sysconfig/firewall before saving your settings. |