<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
		<id>https://wiki.lug.ro/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DerKMix</id>
		<title>Wiki.lug.ro - Contribuții utilizator [ro]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.lug.ro/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DerKMix"/>
		<link rel="alternate" type="text/html" href="https://wiki.lug.ro/index.php/Special:Contribu%C8%9Bii/DerKMix"/>
		<updated>2026-06-10T12:29:46Z</updated>
		<subtitle>Contribuții utilizator</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://wiki.lug.ro/index.php?title=Networking&amp;diff=521</id>
		<title>Networking</title>
		<link rel="alternate" type="text/html" href="https://wiki.lug.ro/index.php?title=Networking&amp;diff=521"/>
				<updated>2006-01-06T16:38:02Z</updated>
		
		<summary type="html">&lt;p&gt;DerKMix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Networking tutoriale=    &lt;br /&gt;
&lt;br /&gt;
pana una alta...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html&lt;/div&gt;</summary>
		<author><name>DerKMix</name></author>	</entry>

	<entry>
		<id>https://wiki.lug.ro/index.php?title=Networking&amp;diff=508</id>
		<title>Networking</title>
		<link rel="alternate" type="text/html" href="https://wiki.lug.ro/index.php?title=Networking&amp;diff=508"/>
				<updated>2006-01-06T16:35:14Z</updated>
		
		<summary type="html">&lt;p&gt;DerKMix: /* Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Networking tutorials=    url:[[http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TCP/IP Network Configuration Files:	&lt;br /&gt;
File: /etc/resolv.conf - host name resolver configuration file &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
search name-of-domain.com  - Name of your domain or ISP's domain if using their name server&lt;br /&gt;
nameserver XXX.XXX.XXX.XXX - IP address of primary name server&lt;br /&gt;
nameserver XXX.XXX.XXX.XXX - IP address of secondary name server&lt;br /&gt;
    &lt;br /&gt;
This configures Linux so that it knows which DNS server will be resolving domain names into IP addresses. If using DHCP client, this will automatically be sent to you by the ISP and loaded into this file as part of the DHCP protocol. If using a static IP address, ask the ISP or check another machine on your network. &lt;br /&gt;
&lt;br /&gt;
File: /etc/hosts - locally resolve node names to IP addresses &lt;br /&gt;
&lt;br /&gt;
127.0.0.1         your-node-name.your-domain.com  localhost.localdomain  localhost &lt;br /&gt;
XXX.XXX.XXX.XXX   node-name&lt;br /&gt;
    &lt;br /&gt;
Note when adding hosts to this file, place the fully qualified name first. (It helps sendmail identify your server correctly) i.e.: &lt;br /&gt;
&lt;br /&gt;
    XXX.XXX.XXX.XXX  superserver.yolinux.com  superserver&lt;br /&gt;
    &lt;br /&gt;
This informs Linux of local systems on the network which are not handled by the DNS server. (or for all systems in your LAN if you are not using DNS or NIS) &lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network &lt;br /&gt;
&lt;br /&gt;
Red Hat network configuration file used by the system during the boot process. &lt;br /&gt;
&lt;br /&gt;
File: /etc/nsswitch.conf - System Databases and Name Service Switch configuration file &lt;br /&gt;
&lt;br /&gt;
hosts:   files dns nisplus nis&lt;br /&gt;
    &lt;br /&gt;
This example tells Linux to first resolve a host name by looking at the local hosts file(/etc/hosts), then if the name is not found look to your DNS server as defined by /etc/resolv.conf and if not found there look to your NIS server. &lt;br /&gt;
&lt;br /&gt;
In the past this file has had the following names: /etc/nsswitch.conf, /etc/svc.conf, /etc/netsvc.conf, ... depending on the distribution. &lt;br /&gt;
&lt;br /&gt;
File: /etc/sysconfig/network-scripts/ifcfg-eth0 &lt;br /&gt;
Configuration settings for your first ethernet port (0). Your second port is eth1. &lt;br /&gt;
&lt;br /&gt;
File: /etc/modules.conf (or for older systems: /etc/conf.modules) &lt;br /&gt;
Example statement for Intel ethernet card: &lt;br /&gt;
&lt;br /&gt;
alias eth0 eepro100&lt;br /&gt;
    &lt;br /&gt;
Modules for other devices on the system will also be listed. This tells the kernel which device driver to use if configured as a loadable module. (default for Red Hat) &lt;br /&gt;
&lt;br /&gt;
Fedora / Red Hat Network GUI Configuration Tools:	&lt;br /&gt;
&lt;br /&gt;
The following GUI tools edit the system configuration files. There is no difference in the configuration developed with the GUI tools and that developed by editing system configuration files directly. &lt;br /&gt;
TCP/IP ethernet configuration: &lt;br /&gt;
Network configuration: &lt;br /&gt;
/usr/sbin/system-config-network (FC-2/3) GUI shown here ---&amp;gt; &lt;br /&gt;
/usr/bin/redhat-config-network (/usr/bin/neat) (RH 7.2+ FC-1) &lt;br /&gt;
Text console configuration tool: &lt;br /&gt;
/usr/sbin/system-config-network-tui (Fedora Core 2/3) &lt;br /&gt;
/usr/bin/redhat-config-network-tui (RH 9.0 - FC-1) &lt;br /&gt;
Text console network configuration tool. &lt;br /&gt;
First interface only - eth0: /usr/sbin/netconfig &lt;br /&gt;
/usr/bin/netcfg (GUI) (last available with RH 7.1) &lt;br /&gt;
Gnome Desktop: &lt;br /&gt;
Gnome Desktop Network Configuration &lt;br /&gt;
/usr/bin/gnome-network-preferences (RH 9.0 - FC-3) &lt;br /&gt;
Proxy configuration. Choose one of three options: &lt;br /&gt;
Direct internet connection &lt;br /&gt;
Manual proxy configuration (specify proxy and port) &lt;br /&gt;
Automatic proxy configuration (give URL) &lt;br /&gt;
&lt;br /&gt;
Assigning an IP address:	&lt;br /&gt;
&lt;br /&gt;
Computers may be assiged a static IP address or assigned one dynamically. &lt;br /&gt;
&lt;br /&gt;
Static IP address assignment:&lt;br /&gt;
&lt;br /&gt;
Choose one of the following methods: &lt;br /&gt;
Command Line: &lt;br /&gt;
&lt;br /&gt;
    /sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255&lt;br /&gt;
    &lt;br /&gt;
Network address by convention would be the lowest: 192.168.10.0 &lt;br /&gt;
Broadcast address by convention would be the highest: 192.168.10.255 &lt;br /&gt;
The gateway can be anything, but following convention: 192.168.10.1 &lt;br /&gt;
&lt;br /&gt;
Note: the highest and lowest addresses are based on the netmask. The previous example is based on a netmask of 255.255.255.0 &lt;br /&gt;
&lt;br /&gt;
GUI tools: &lt;br /&gt;
/usr/bin/neat Gnome GUI network administration tool. Handles all interfaces. Configure for Static IP or DHCP client. &lt;br /&gt;
(First available with Red Hat 7.2.) &lt;br /&gt;
/usr/bin/netcfg (Handles all interfaces) (last available in Red Hat 7.1) &lt;br /&gt;
&lt;br /&gt;
Console tool: /usr/sbin/netconfig (Only seems to work for the first network interface eth0 but not eth1,...) &lt;br /&gt;
&lt;br /&gt;
Directly edit configuration files/scripts. See format below. &lt;br /&gt;
&lt;br /&gt;
The ifconfig command does NOT store this information permanently. Upon reboot this information is lost. (Manually add the commands to the end of the file /etc/rc.d/rc.local to execute them upon boot.) The commands netcfg and netconfig make permanent changes to system network configuration files located in /etc/sysconfig/network-scripts/, so that this information is retained. &lt;br /&gt;
&lt;br /&gt;
The IANA has allocated IP addresses in the range of 192.168.0.0 to 192.168.255.255 for private networks. &lt;br /&gt;
&lt;br /&gt;
Helpful tools: &lt;br /&gt;
Cisco's IP Subnet calculator &lt;br /&gt;
CIDR Conversion table - CIDR values, masks etc. &lt;br /&gt;
&lt;br /&gt;
The Red Hat configuration tools store the configuration information in the file /etc/sysconfig/network. &lt;br /&gt;
They will also allow one to configure routing information. &lt;br /&gt;
&lt;br /&gt;
File: /etc/sysconfig/network &lt;br /&gt;
&lt;br /&gt;
Static IP address Configuration: (Configure gateway address) &lt;br /&gt;
&lt;br /&gt;
NETWORKING=yes&lt;br /&gt;
HOSTNAME=my-hostname      - Hostname is defined here and by command hostname&lt;br /&gt;
FORWARD_IPV4=true         - True for NAT firewall gateways and linux routers. False for everyone else - desktops and servers.&lt;br /&gt;
GATEWAY=&amp;quot;XXX.XXX.XXX.YYY&amp;quot; - Used if your network is connected to another network or the internet. &lt;br /&gt;
                            Static IP configuration. Gateway not defined here for DHCP client.&lt;br /&gt;
OR for DHCP client configuration: &lt;br /&gt;
&lt;br /&gt;
NETWORKING=yes&lt;br /&gt;
HOSTNAME=my-hostname      - Hostname is defined here and by command hostname&lt;br /&gt;
(Gateway is assigned by DHCP server.) &lt;br /&gt;
&lt;br /&gt;
File (Red Hat/Fedora): /etc/sysconfig/network-scripts/ifcfg-eth0 &lt;br /&gt;
(S.u.s.e.: /etc/sysconfig/network/ifcfg-eth-id-XX:XX:XX:XX:XX) &lt;br /&gt;
&lt;br /&gt;
Static IP address configuration: &lt;br /&gt;
&lt;br /&gt;
DEVICE=eth0&lt;br /&gt;
BOOTPROTO=static&lt;br /&gt;
BROADCAST=XXX.XXX.XXX.255&lt;br /&gt;
IPADDR=XXX.XXX.XXX.XXX&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
NETWORK=XXX.XXX.XXX.0&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
OR for DHCP client configuration: &lt;br /&gt;
&lt;br /&gt;
DEVICE=eth0&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
BOOTPROTO=dhcp&lt;br /&gt;
(Used by script /etc/sysconfig/network-scripts/ifup to bring the various network interfaces on-line) &lt;br /&gt;
To disable DHCP change BOOTPROTO=dhcp to BOOTPROTO=none &lt;br /&gt;
&lt;br /&gt;
In order for updated information in any of these files to take effect, one must issue the command: service network restart &lt;br /&gt;
&lt;br /&gt;
Changing the host name:	&lt;br /&gt;
&lt;br /&gt;
This is a three step process: &lt;br /&gt;
Issue the command: hostname new-host-name &lt;br /&gt;
Change network configuration file: /etc/sysconfig/network &lt;br /&gt;
Edit entry: HOSTNAME=new-host-name &lt;br /&gt;
Restart systems which relied on the hostname (or reboot): &lt;br /&gt;
Restart network services: service network restart &lt;br /&gt;
Restart desktop: &lt;br /&gt;
Bring down system to console mode: init 3 &lt;br /&gt;
Bring up X-Windows: init 5 &lt;br /&gt;
One may also want to check the file /etc/hosts for an entry using the system name which allows the system to be self aware. &lt;br /&gt;
&lt;br /&gt;
Network IP aliasing:	&lt;br /&gt;
&lt;br /&gt;
Assign more than one IP address to one ethernet card: &lt;br /&gt;
&lt;br /&gt;
    ifconfig eth0   XXX.XXX.XXX.XXX netmask 255.255.255.0 broadcast XXX.XXX.XXX.255&lt;br /&gt;
    ifconfig eth0:0 192.168.10.12   netmask 255.255.255.0 broadcast 192.168.10.255&lt;br /&gt;
    ifconfig eth0:1 192.168.10.14   netmask 255.255.255.0 broadcast 192.168.10.255&lt;br /&gt;
 &lt;br /&gt;
    route add -host XXX.XXX.XXX.XXX dev eth0&lt;br /&gt;
    route add -host 192.168.10.12 dev eth0&lt;br /&gt;
    route add -host 192.168.10.14 dev eth0&lt;br /&gt;
In this example 0 and 1 are aliases in addition to the regular eth0. The result of the ifconfig command: &lt;br /&gt;
&lt;br /&gt;
eth0      Link encap:Ethernet  HWaddr 00:10:4C:25:7A:3F  &lt;br /&gt;
          inet addr:XXX.XXX.XXX.XXX  Bcast:XXX.XXX.XXX.255  Mask:255.255.255.0&lt;br /&gt;
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
          RX packets:14218 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:1362 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:1 txqueuelen:100 &lt;br /&gt;
          Interrupt:5 Base address:0xe400 &lt;br /&gt;
&lt;br /&gt;
eth0:0    Link encap:Ethernet  HWaddr 00:10:4C:25:7A:3F  &lt;br /&gt;
          inet addr:192.168.10.12  Bcast:192.168.10.255  Mask:255.255.255.0&lt;br /&gt;
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
          Interrupt:5 Base address:0xe400 &lt;br /&gt;
&lt;br /&gt;
eth0:1    Link encap:Ethernet  HWaddr 00:10:4C:25:7A:3F  &lt;br /&gt;
          inet addr:192.168.10.14  Bcast:192.168.10.255  Mask:255.255.255.0&lt;br /&gt;
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
          Interrupt:5 Base address:0xe400 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Config file: /etc/sysconfig/network-scripts/ifcfg-eth0:0 &lt;br /&gt;
&lt;br /&gt;
DEVICE=eth0:0&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
BOOTPROTO=static&lt;br /&gt;
BROADCAST=192.168.10.255&lt;br /&gt;
IPADDR=192.168.10.12&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
NETWORK=192.168.10.0&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
Aliases can also be shut down independently. i.e.: ifdown eth0:0 &lt;br /&gt;
&lt;br /&gt;
The option during kernel compile is: CONFIG_IP_ALIAS=y (Enabled by default in Redhat) &lt;br /&gt;
&lt;br /&gt;
Note: The Apache web server can be configured so that different IP addresses can be assigned to specific domains being hosted. See Apache configuration and &amp;quot;configuring an IP based virtual host&amp;quot; in the YoLinux Web site configuration tutorial. &lt;br /&gt;
&lt;br /&gt;
DHCP Linux Client: get connection info: /sbin/pump -i eth0 --status &lt;br /&gt;
(Red Hat Linux 7.1 and older) &lt;br /&gt;
&lt;br /&gt;
Device eth0&lt;br /&gt;
IP: 4.XXX.XXX.XXX&lt;br /&gt;
Netmask: 255.255.252.0&lt;br /&gt;
Broadcast: 4.XXX.XXX.255&lt;br /&gt;
Network: 4.XXX.XXX.0&lt;br /&gt;
Boot server 131.XXX.XXX.4&lt;br /&gt;
Next server 0.0.0.0&lt;br /&gt;
Gateway: 4.XXX.XXX.1&lt;br /&gt;
Domain: vz.dsl.genuity.net&lt;br /&gt;
Nameservers: 4.XXX.XXX.1 4.XXX.XXX.2 4.XXX.XXX.3&lt;br /&gt;
Renewal time: Sat Aug 11 08:28:55 2001&lt;br /&gt;
Expiration time: Sat Aug 11 11:28:55 2001&lt;br /&gt;
&lt;br /&gt;
Activating and De-Activating your NIC:	&lt;br /&gt;
&lt;br /&gt;
Commands for starting and stopping TCP/IP network services on an interface: &lt;br /&gt;
Activate: /sbin/ifup eth0 &lt;br /&gt;
(Also: ifconfig eth0 up - Note: Even if no IP address is assigned you can listen.) &lt;br /&gt;
De-Activate: /sbin/ifdown eth0 &lt;br /&gt;
(Also: ifconfig eth0 down) &lt;br /&gt;
These scripts use the scripts and NIC config &lt;br /&gt;
files in /etc/sysconfig/network-scripts/ &lt;br /&gt;
&lt;br /&gt;
GUI Interface control/configuration: &lt;br /&gt;
Start/Stop network interfaces &lt;br /&gt;
/usr/bin/system-control-network (Fedora Core 2/3) &lt;br /&gt;
/usr/bin/redhat-control-network (RH 9.0 - FC-1) &lt;br /&gt;
Configure Ethernet, ISDN, modem, token Ring, Wireless or DSL network connection: &lt;br /&gt;
/usr/sbin/system-config-network-druid (FC2/3) &lt;br /&gt;
/usr/sbin/redhat-config-network-druid (RH 9 - FC-1) &lt;br /&gt;
&lt;br /&gt;
Subnets:	&lt;br /&gt;
&lt;br /&gt;
MASK	# OF SUBNETS	Slash&lt;br /&gt;
Format	CLASS A&lt;br /&gt;
HOSTS	CLASS A&lt;br /&gt;
MASK	CLASS B&lt;br /&gt;
HOSTS	CLASS B&lt;br /&gt;
MASK	CLASS C&lt;br /&gt;
HOSTS	CLASS C&lt;br /&gt;
MASK	CLASS C SUB&lt;br /&gt;
HOSTS	CLASS C SUB&lt;br /&gt;
MASK	&lt;br /&gt;
255	1 or 256	/32	16,777,214	255.0.0.0	65,534	255.255.0.0	254	255.255.255.0	Invalid&lt;br /&gt;
1 address	255.255.255.255	&lt;br /&gt;
254	128	/31	33,554,430	254.0.0.0	131,070	255.254.0.0	510	255.255.254.0	Invalid&lt;br /&gt;
2 addresses	255.255.255.254	&lt;br /&gt;
252	64	/30	67,108,862	252.0.0.0	262,142	255.252.0.0	1,022	255.255.252.0	2 hosts&lt;br /&gt;
4 addresses	255.255.255.252	&lt;br /&gt;
248	32	/29	134,217,726	248.0.0.0	524,286	255.248.0.0	2,046	255.255.248.0	6 hosts&lt;br /&gt;
8 addresses	255.255.255.248	&lt;br /&gt;
240	16	/28	268,435,454	240.0.0.0	1,048,574	255.240.0.0	4,094	255.255.240.0	14 hosts&lt;br /&gt;
16 addresses	255.255.255.240	&lt;br /&gt;
224	8	/27	536,870,910	224.0.0.0	2,097,150	255.224.0.0	8,190	255.255.224.0	30 hosts&lt;br /&gt;
32 addresses	255.255.255.224	&lt;br /&gt;
192	4	/26	1,073,741,822	192.0.0.0	4,194,302	255.192.0.0	16,382	255.255.192.0	62 hosts&lt;br /&gt;
64 addresses	255.255.255.192	&lt;br /&gt;
128	2	/25	2,147,483,646	128.0.0.0	8,388,606	255.128.0.0	32,766	255.255.128.0	126 hosts&lt;br /&gt;
128 addresses	255.255.255.128	&lt;br /&gt;
&lt;br /&gt;
Binary position	8	7	6	5	4	3	2	1	&lt;br /&gt;
Value	128	64	32	16	8	4	2	1	&lt;br /&gt;
Example: 192	1	1	0	0	0	0	0	0	&lt;br /&gt;
&lt;br /&gt;
Example 192=128+64 &lt;br /&gt;
&lt;br /&gt;
Some addresses are reserved and outside this scope. Loopback (127.0.0.1), reserved class C 192.168.XXX.XXX, reserved class B 172.31.XXX.XXX and reserved class A 10.XXX.XXX.XXX. &lt;br /&gt;
&lt;br /&gt;
Subnet Example: &lt;br /&gt;
Your ISP assigns you a subnet mask of 255.255.255.248 for your office. &lt;br /&gt;
208.88.34.104 Network Base address &lt;br /&gt;
208.88.34.105 Computer 1 &lt;br /&gt;
208.88.34.106 Computer 2 &lt;br /&gt;
208.88.34.107 Computer 3 &lt;br /&gt;
208.88.34.108 Computer 4 &lt;br /&gt;
208.88.34.109 Computer 5 &lt;br /&gt;
208.88.34.110 DSL router/Gateway &lt;br /&gt;
208.88.34.111 Broadcast address &lt;br /&gt;
Of the eight addresses, there are six assigned to hardware systems and ultimately only five usable addresses. &lt;br /&gt;
&lt;br /&gt;
Links: &lt;br /&gt;
What's A Netmask And Why Do I Need One? &lt;br /&gt;
Subnet Cheat Sheet &lt;br /&gt;
Subnet calculator &lt;br /&gt;
CIDR Converstion Table &lt;br /&gt;
Table of subnets &lt;br /&gt;
IP Subnetting, Variable Subnetting, and CIDR (Supernetting) &lt;br /&gt;
CISCO.com: Subnet Masking and Addressing &lt;br /&gt;
&lt;br /&gt;
Network Classes:	&lt;br /&gt;
&lt;br /&gt;
The concept of network classes is a little obsolete as subnets are now used to define smaller networks. These subnets may be part of a class A, B, C, etc network. For historical reference the network classes are defined as follows: &lt;br /&gt;
Class A: Defined by the first 8 bits with a range of 0 - 127. &lt;br /&gt;
First number (8 bits) is defined by Internic i.e. 77.XXX.XXX.XXX &lt;br /&gt;
One class A network can define 16,777,214 hosts. &lt;br /&gt;
Range: 0.0.0.0 - 127.255.255.255 &lt;br /&gt;
Class B: Defined by the first 8 bits with a range from 128 - 191 &lt;br /&gt;
First two numbers (16 bits) are defined by Internic i.e. 182.56.XXX.XXX &lt;br /&gt;
One class B network can define 65,534 hosts. &lt;br /&gt;
Range: 128.0.0.0 - 191.255.255.255 &lt;br /&gt;
Class C: Defined by the first 8 bits with a range from 192 - 223 &lt;br /&gt;
First three numbers (24 bits) are defined by Internic i.e. 220.56.222.XXX &lt;br /&gt;
One class B network can define 254 hosts. &lt;br /&gt;
Range: 192.0.0.0 - 223.255.255.255 &lt;br /&gt;
Class D: Defined by the first 8 bits with a range from 224 - 239 &lt;br /&gt;
This is reserved for multicast networks (RFC988) &lt;br /&gt;
Range: 224.0.0.0 - 239.255.255.255 &lt;br /&gt;
Class E: Defined by the first 8 bits with a range from 240 - 255 &lt;br /&gt;
This is reserved for experimental use. &lt;br /&gt;
Range: 240.0.0.0 - 247.255.255.255 &lt;br /&gt;
&lt;br /&gt;
Enable Forwarding:	&lt;br /&gt;
Forwarding allows the network packets on one network interface (i.e. eth0) to be forwarded to another network interface (i.e. eth1). This will allow the Linux computer to conect (&amp;quot;ethernet bridge&amp;quot;) or route network traffic. &lt;br /&gt;
&lt;br /&gt;
The bridge configuration will merge two (or several) networks into one single network topology. IpTables firewall rules can be used to filter traffic. &lt;br /&gt;
&lt;br /&gt;
A router configuration can support multicast and basic IP routing using the &amp;quot;route&amp;quot; command. IP masquerading (NAT) can be used to connect private local area networks (LAN) to the internet or load balance servers. &lt;br /&gt;
Turn on IP forwarding to allow Linux computer to act as a gateway or router. &lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward &lt;br /&gt;
Default is 0. One can add firewall rules by using ipchains. &lt;br /&gt;
&lt;br /&gt;
Another method is to alter the Linux kernel config file: /etc/sysctl.conf Set the following value: &lt;br /&gt;
&lt;br /&gt;
net.ipv4.ip_forward = 1&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
See file /etc/sysconfig/network for storing this configuration. &lt;br /&gt;
&lt;br /&gt;
FORWARD_IPV4=true&lt;br /&gt;
    &lt;br /&gt;
Change the default &amp;quot;false&amp;quot; to &amp;quot;true&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
All methods will result in a proc file value of &amp;quot;1&amp;quot;. Test: cat /proc/sys/net/ipv4/ip_forward &lt;br /&gt;
&lt;br /&gt;
The TCP Man page - Linux Programmer's Manual and /usr/src/linux/Documentation/proc.txt (Kernel 2.2 RH 7.0-) [alt link] cover /proc/sys/net/ipv4/* file descriptions. &lt;br /&gt;
&lt;br /&gt;
Alos see: (YoLinux tutorials) &lt;br /&gt;
Configure Linux as an internet gateway router: Using Linux and iptables/ipchains to set up an internet gateway for home or office (iptables) &lt;br /&gt;
Load balancing servers using LVS (Linux Virtual Server) (ipvsadm) &lt;br /&gt;
&lt;br /&gt;
Adding a network interface card (NIC):	&lt;br /&gt;
&lt;br /&gt;
Manual method: This does not alter the permanent configuration and will only configure support until the next reboot. &lt;br /&gt;
cd /lib/modules/2.2.5-15/net/ - Use kernel version for your system. This example uses 2.2.5-15 &lt;br /&gt;
Here you will find the modules supported by your system. &lt;br /&gt;
It can be permanently added to /etc/modules.conf (or for older systems: /etc/conf.modules) &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
    alias eth0 3c59x&lt;br /&gt;
    &lt;br /&gt;
/sbin/insmod -v 3c59x (For a 3Com ethernet card) &lt;br /&gt;
ifconfig ... &lt;br /&gt;
&lt;br /&gt;
The easy way: Red Hat versions 6.2 and later, ship with Kudzu, a device detection program which runs during system initialization. (/etc/rc.d/init.d/kudzu) This can detect a newly installed NIC and load the appropriate driver. Then use /usr/sbin/netconfig to configure the IP address and network settings. The configuration will be stored so that it will be utilized upon system boot. &lt;br /&gt;
&lt;br /&gt;
Systems with two NIC cards: Typically two cards are used when connecting to two networks. In this case the device must be defined using one of three methods: &lt;br /&gt;
Use the Red Hat GUI tool /usr/bin/netcfg &lt;br /&gt;
&lt;br /&gt;
OR &lt;br /&gt;
&lt;br /&gt;
Define network parameters in configuration files: &lt;br /&gt;
&lt;br /&gt;
Define new device in file (Red Hat/Fedora) /etc/sysconfig/network-scripts/ifcfg-eth1 &lt;br /&gt;
(S.u.s.e 9.2: /etc/sysconfig/network/ifcfg-eth-id-XX:XX:XX:XX:XX) &lt;br /&gt;
&lt;br /&gt;
DEVICE=eth1&lt;br /&gt;
BOOTPROTO=static&lt;br /&gt;
IPADDR=192.168.10.12&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
GATEWAY=XXX.XXX.XXX.XXX&lt;br /&gt;
HOSTNAME=node-name.name-of-domain.com&lt;br /&gt;
DOMAIN=name-of-domain.com&lt;br /&gt;
Special routing information may be specified, if necessary, in the file &lt;br /&gt;
(Red Hat/Fedora): /etc/sysconfig/static-routes &lt;br /&gt;
(S.u.s.e. 9.2: /etc/sysconfig/network/routes) &lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
eth1 net XXX.XXX.XXX.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX&lt;br /&gt;
&lt;br /&gt;
OR &lt;br /&gt;
&lt;br /&gt;
Define network parameters using Unix command line interface: &lt;br /&gt;
&lt;br /&gt;
Define IP address: &lt;br /&gt;
&lt;br /&gt;
    ifconfig eth0  XXX.XXX.XXX.XXX netmask 255.255.255.0 broadcast XXX.XXX.XXX.255&lt;br /&gt;
    ifconfig eth1  192.168.10.12   netmask 255.255.255.0 broadcast 192.168.10.255&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
If necessary, define route with with the route command: &lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
  route add default gw XXX.XXX.XXX.XXX dev eth0&lt;br /&gt;
  route add  -net  XXX.XXX.XXX.0  netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev eth0 &lt;br /&gt;
Where XXX.XXX.XXX.XXX is the gateway to the internet as defined by your ISP or network operator. &lt;br /&gt;
&lt;br /&gt;
If a mistake is made just repeat the route command substituting &amp;quot;del&amp;quot; in place of &amp;quot;add&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Configuring your NIC: Speed and Duplex settings:	&lt;br /&gt;
&lt;br /&gt;
This is usually not necessary because most ethernet adapters can auto-negotiate link speed and duplex setting. &lt;br /&gt;
List NIC speed and configuration: mii-tool &lt;br /&gt;
eth0: negotiated 100baseTx-FD flow-control, link ok &lt;br /&gt;
&lt;br /&gt;
Verbose mode: mii-tool -v &lt;br /&gt;
&lt;br /&gt;
eth0: negotiated 100baseTx-FD flow-control, link ok&lt;br /&gt;
  product info: Intel 82555 rev 4&lt;br /&gt;
  basic mode:   autonegotiation enabled&lt;br /&gt;
  basic status: autonegotiation complete, link ok&lt;br /&gt;
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD&lt;br /&gt;
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control&lt;br /&gt;
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control&lt;br /&gt;
    &lt;br /&gt;
Set NIC configuration: mii-tool -F option &lt;br /&gt;
&lt;br /&gt;
Option	Parameters	&lt;br /&gt;
-F	100baseTx-FD&lt;br /&gt;
100baseTx-HD&lt;br /&gt;
10baseT-FD&lt;br /&gt;
10baseT-HD	&lt;br /&gt;
-A	100baseT4&lt;br /&gt;
100baseTx-FD&lt;br /&gt;
100baseTx-HD&lt;br /&gt;
10baseT-FD&lt;br /&gt;
10baseT-HD	&lt;br /&gt;
&lt;br /&gt;
Query NIC with ethtool: &lt;br /&gt;
Command	Description	&lt;br /&gt;
ethtool -g eth0	Queries ethernet device for rx/tx ring parameter information.	&lt;br /&gt;
ethtool -a eth0 	Queries ethernet device for pause parameter information.	&lt;br /&gt;
ethtool -c eth0 	Queries ethernet device for coalescing information.	&lt;br /&gt;
ethtool -i eth0 	Queries ethernet device for associated driver information.	&lt;br /&gt;
ethtool -d eth0 	Prints a register dump for the specified ethernet device.	&lt;br /&gt;
ethtool -k eth0 	Queries ethernet device for offload information.	&lt;br /&gt;
ethtool -S eth0 	Queries ethernet device for NIC and driver statistics.	&lt;br /&gt;
&lt;br /&gt;
Man Pages: &lt;br /&gt;
mii-tool - view, manipulate media-independent interface status &lt;br /&gt;
ethtool - Display or change ethernet card settings &lt;br /&gt;
&lt;br /&gt;
Route:	&lt;br /&gt;
&lt;br /&gt;
Static routes: IP (Internet Protocol) uses a routing table to determine where packets should be sent. First the packet is examined to see if its' destination is for the local or remote network. If it is to be sent to a remote network, the routing table is consulted to determine the path. If there is no information in the routing table then the packet is sent to the default gateway. Static routes are set with the route command and with the configuration file &lt;br /&gt;
(Red Hat/Fedora): /etc/sysconfig/network-scripts/route-eth0 &lt;br /&gt;
or &lt;br /&gt;
(Red Hat 7: /etc/sysconfig/static-routes) &lt;br /&gt;
(S.u.s.e. 9.2: /etc/sysconfig/network/routes): &lt;br /&gt;
&lt;br /&gt;
10.2.3.0/16 via 192.168.10.254&lt;br /&gt;
See command: /etc/sysconfig/network-scripts/ifup-routes eth0 &lt;br /&gt;
&lt;br /&gt;
Dynamic routes: RIP (Routing Information Protocol) is used to define dynamic routes. If multiple routes are possible, RIP will choose the shortest route. (Fewest hops between routers not physical distance.) Routers use RIP to broadcast the routing table over UDP port 520. The routers would then add new or improved routes to their routing tables. &lt;br /&gt;
&lt;br /&gt;
Man pages: &lt;br /&gt;
route - show / manipulate the IP routing table (Static route) &lt;br /&gt;
Examples: &lt;br /&gt;
Show routing table: route -e &lt;br /&gt;
Access individual computer host specified via network interface card eth1: &lt;br /&gt;
route add -host 123.213.221.231 eth1 &lt;br /&gt;
Access ISP network identified by the network address and netmask using network interface card eth0: &lt;br /&gt;
route add -net 10.13.21.0 netmask 255.255.255.0 gw 192.168.10.254 eth0 &lt;br /&gt;
Conversly: route del -net 10.13.21.0 netmask 255.255.255.0 gw 192.168.10.254 eth0 &lt;br /&gt;
Specify default gateway to use to access remote network via network interface card eth0: &lt;br /&gt;
route add default gw 201.51.31.1 eth0 &lt;br /&gt;
(Gateway can also be defined in /etc/sysconfig/network) &lt;br /&gt;
Specify two gateways for two network destinations: (i.e. one external, one internal private network. Two routers/gateways will be specified.) &lt;br /&gt;
Add internet gateway as before: route add default gw 201.51.31.1 eth0 &lt;br /&gt;
Add second private network: route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.10.254 eth0 &lt;br /&gt;
routed - network routing daemon. Uses RIP protocol to update routing table. &lt;br /&gt;
ipx_route - show / manipulate the IPX routing table - IPX is the Novell networking protocol (Not typically used unless your office has Novell servers) &lt;br /&gt;
ifuser - Identify destinations routed to a particular network interface. &lt;br /&gt;
&lt;br /&gt;
VPN, Tunneling:	&lt;br /&gt;
Commercial VPN Linux software solutions - YoLinux &lt;br /&gt;
CIPE: Crypto IP Encapsulation (Easiest way to configure two Linux gateways connecting two private networks over the internet with encryption.) &lt;br /&gt;
CIPE Home page - CIPE is a simple encapsulation system that securely connects two subnets. &lt;br /&gt;
VPN, Firewall, Gateway Mini How To - Keith Hasely &lt;br /&gt;
The Linux Cipe+Masquerading mini-HOWTO - Anthony Ciaravalo &lt;br /&gt;
Freeswan IPSec - An IPSec project for Linux (known as Freeswan and KLIPS). &lt;br /&gt;
GRE Tunneling - Hugo Samayoa &lt;br /&gt;
VPN HowTo - Matthew D. Wilson &lt;br /&gt;
Linux VPN support - PPTP, L2TP, ppp over SSH tunnel, VPN support working with 128-bit rc4 encryption. By Michael Elkins &lt;br /&gt;
Installing and Running PPTP on Linux &lt;br /&gt;
Tunnel Vision VPN for Linux - creates an encrypted VPN between two Tunnel Vision-capable sites. &lt;br /&gt;
Linux VPN Masquerade &lt;br /&gt;
Cerberus - An IPsec implementation for Linux &lt;br /&gt;
L2TPD - Layer Two Tunneling Protocol. (For PPP) &lt;br /&gt;
L2TP Extensions (l2tpext) Internet Drafts. &lt;br /&gt;
Description of the CISCO VPN at Cal Tech - Supports Linux (kernel 2.2), Solaris, MS/Windows 95/98/ME/NT/2000, Mac OS X/7.6-9.x &lt;br /&gt;
&lt;br /&gt;
Usefull Linux networking commands:	&lt;br /&gt;
/etc/rc.d/init.d/network   start - command to start, restart or stop the network &lt;br /&gt;
netstat - Display connections, routing tables, stats etc &lt;br /&gt;
List externally connected processes: netstat -punta &lt;br /&gt;
List all connected processes: netstat -nap &lt;br /&gt;
Show network statistics: netstat -s &lt;br /&gt;
Kernel interface table info: netstat -a -i eth0 &lt;br /&gt;
ping - send ICMP ECHO_REQUEST packets to network hosts. Use Cntl-C to stop ping. &lt;br /&gt;
traceroute - print the route packets take to network host &lt;br /&gt;
traceroute IP-address-of-server &lt;br /&gt;
traceroute domain-name-of-server &lt;br /&gt;
mtr - a network diagnostic tool introduced in Fedora - Like traceroute except it gives more network quality and network diagnostic info. Leave running to get real time stats. Reports best and worst round trip times in milliseconds. &lt;br /&gt;
mtr IP-address-of-server &lt;br /&gt;
mtr domain-name-of-server &lt;br /&gt;
whois - Lookup a domain name in the internic whois database. &lt;br /&gt;
finger - Display information on a system user. i.e. finger user@host Uses $HOME/.plan and $HOME/.project user files. Often used by game developers. See http://finger.planetquake.com/ &lt;br /&gt;
iptables - IP firewall administration (Linux kernel 2.6/2.4) See YoLinux firewall/gateway configuration. &lt;br /&gt;
ipchains - IP firewall administration (Linux kernel 2.2) See YoLinux firewall/gateway configuration. &lt;br /&gt;
socklist - Display list of open sockets, type, port, process id and the name of the process. Kill with fuser or kill. &lt;br /&gt;
host - Give a host name and the command will return IP address. Unlike nslookup, the host command will use both /etc/hosts as well as DNS. &lt;br /&gt;
Example: host domain-name-of-server &lt;br /&gt;
nslookup - Give a host name and the command will return IP address. Also see Testing your DNS (YoLinux Tutorial) Note that nslookup does not use the /etc/hosts file. &lt;br /&gt;
&lt;br /&gt;
inetd/xinetd: Network Socket Listener Daemons:	&lt;br /&gt;
&lt;br /&gt;
The network listening daemons listen and respond to all network socket connections made on the TCP/IP ports assigned to it. The ports are defined by the file /etc/services. When a connection is made, the listener will attempt to invoke the assigned program and pipe the data to it. This simplified matters by allowing the assigned program to read from stdin instead of making its own sockets connection. The listener hadles the network socket connection. Two network listening and management daemons have been used in Red Hat Linux distributions: &lt;br /&gt;
inetd: Red Hat 6.x and older &lt;br /&gt;
xinetd: Red Hat 7.0-9.0, Fedora Core &lt;br /&gt;
&lt;br /&gt;
inetd:	&lt;br /&gt;
Configuration file: /etc/inetd.conf &lt;br /&gt;
Entries in this file consist of a single line made up of the following fields: &lt;br /&gt;
&lt;br /&gt;
        service socket-type protocol wait user server cmdline&lt;br /&gt;
&lt;br /&gt;
service: The name assigned to the service. Matches the name given in the file /etc/services &lt;br /&gt;
socket-type: &lt;br /&gt;
stream: connection protocols (TCP) &lt;br /&gt;
dgram: datagram protocols (UDP) &lt;br /&gt;
raw &lt;br /&gt;
rdm &lt;br /&gt;
seqpacket &lt;br /&gt;
protocol: Transport protocol name which matches a name in the file /etc/protocols. i.e. udp, icmp, tcp, rpc/udp, rpc/tcp, ip, ipv6 &lt;br /&gt;
wait: Applies only to datagram protocols (UDP). &lt;br /&gt;
wait[.max]: One server for the specified port at any time (RPC) &lt;br /&gt;
nowait[.max]: Continue to listen and launch new services if a new connection is made. (multi-threaded) &lt;br /&gt;
Max refers to the maximum number of server instances spawned in 60 seconds. (default=40) &lt;br /&gt;
user[.group]: login id of the user the process is executed under. Often nobody, root or a special restricted id for that service. &lt;br /&gt;
server: Full path name of the server program to be executed. cmdline: Command line to be passed to the server. This includes argument 0 (argv[0]), that is the command name. This field is empty for internal services. Example of internal TCP services: echo, discard, chargen (character generator), daytime (human readable time), and time (machine readable time). (see RFC) &lt;br /&gt;
&lt;br /&gt;
Sample File: /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
#echo   stream  tcp     nowait  root    internal&lt;br /&gt;
#echo   dgram   udp     wait    root    internal&lt;br /&gt;
&lt;br /&gt;
ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  in.ftpd -l -a&lt;br /&gt;
#pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd ipop3d&lt;br /&gt;
#swat      stream  tcp     nowait.400      root /usr/sbin/swat swat&lt;br /&gt;
A line may be commented out by using a '#' as the first character in the line. This will turn the service off. The maximum length of a line is 1022 characters. &lt;br /&gt;
&lt;br /&gt;
The inet daemon must be restarted to pick up the changes made to the file: &lt;br /&gt;
/etc/rc.d/init.d/inetd restart &lt;br /&gt;
&lt;br /&gt;
For more information see the man pages &amp;quot;inetd&amp;quot; and &amp;quot;inetd.conf&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
xinetd: Extended Internet Services Daemon:	&lt;br /&gt;
Xinetd has access control machanisms, logging capabilities, the ability to make services available based on time, and can place limits on the number of servers that can be started, redirect services to different ports and network interfaces (NIC) or even to a different server, chroot a service etc... and thus a worthy upgrade from inetd. &lt;br /&gt;
&lt;br /&gt;
Use the command chkconfig --list to view all system services and their state. It will also list all network services controlled by xinetd and their respective state under the title &amp;quot;xinetd based services&amp;quot;. (Works for xinetd (RH7.0+) but not inetd) &lt;br /&gt;
&lt;br /&gt;
The xinetd network daemon uses PAM also called network wrappers which invoke the /etc/hosts.allow and /etc/hosts.deny files. &lt;br /&gt;
&lt;br /&gt;
Configuration file: /etc/xinetd.conf which in turn uses configuration files found in the directory /etc/xinetd.d/. &lt;br /&gt;
&lt;br /&gt;
To turn a network service on or off: &lt;br /&gt;
Edit the file /etc/xinetd.d/service-name &lt;br /&gt;
Set the disable value: &lt;br /&gt;
&lt;br /&gt;
disable = yes &lt;br /&gt;
or &lt;br /&gt;
disable = no &lt;br /&gt;
Restart the xinetd process using the signal: &lt;br /&gt;
SIGUSR1 (kill -SIGUSR1 process-id) - Soft reconfiguration does not terminate existing connections. (Important if you are connected remotely) &lt;br /&gt;
SIGUSR2 - Hard reconfiguration stops and restarts the xinetd process. &lt;br /&gt;
(Note: Using the HUP signal will terminate the process.) &lt;br /&gt;
OR &lt;br /&gt;
&lt;br /&gt;
Use the chkconfig command: chkconfig service-name on &lt;br /&gt;
(or off) &lt;br /&gt;
This command will also restart the xinetd process to pick up the new configuration. &lt;br /&gt;
&lt;br /&gt;
The file contains entries of the form: &lt;br /&gt;
&lt;br /&gt;
      service service-name&lt;br /&gt;
      {&lt;br /&gt;
         attribute  assignment-operator value value ...&lt;br /&gt;
         ...&lt;br /&gt;
      {&lt;br /&gt;
Where: &lt;br /&gt;
attribute: &lt;br /&gt;
disable: &lt;br /&gt;
yes &lt;br /&gt;
no &lt;br /&gt;
type: &lt;br /&gt;
RPC &lt;br /&gt;
INTERNAL: &lt;br /&gt;
UNLISTED: Not found in /etc/rpc or /etc/services &lt;br /&gt;
id: By default the service id is the same as the service name. &lt;br /&gt;
socket_type: &lt;br /&gt;
stream: TCP &lt;br /&gt;
dgram: UDP &lt;br /&gt;
raw: Direct IP access &lt;br /&gt;
seqpacket: service that requires reliable sequential datagram transmission &lt;br /&gt;
flags: Combination of: REUSE, INTERCEPT, NORETRY, IDONLY, NAMEINARGS, NODELAY, DISABLE, KEEPALIVE, NOLIBWRAP. &lt;br /&gt;
See the xinetd man page for details. &lt;br /&gt;
protocol: Transport protocol name which matches a name in the file /etc/protocols. &lt;br /&gt;
wait: &lt;br /&gt;
no: multi-threaded &lt;br /&gt;
yes: single-threaded - One server for the specified port at any time (RPC) &lt;br /&gt;
user: See file : /etc/passwd &lt;br /&gt;
group: See file : /etc/group &lt;br /&gt;
server: Program to execute and recieve data stream from socket. (Fully qualified name - full pathe name of program) &lt;br /&gt;
server_args: Unlike inetd, arg[0] or the name of the service is not passed. &lt;br /&gt;
only_from: IP address, factorized address, netmask range, hostname or network name from file /etc/networks. &lt;br /&gt;
no_access: Deny from ... (inverse of only_from) &lt;br /&gt;
access_times &lt;br /&gt;
port: See file /etc/services &lt;br /&gt;
Also: log_type, log_on_success, log_on_failure (Log options: += PID,HOST,USERID,EXIT,DURATION,ATTEMPT and RECORD), rpc_version, rpc_number, env, passenv, redirect, bind, interface, banner, banner_success, banner_fail, per_source, cps, max_load, groups, enabled, include, includedir, rlimit_as, rlimit_cpu, rlimit_data, rlimit_rss, rlimit_stack. &lt;br /&gt;
The best source of information is the man page and its many examples. &lt;br /&gt;
assignment-operator: &lt;br /&gt;
= &lt;br /&gt;
+=: add a value to the set of values &lt;br /&gt;
-=: delete a value from the set of values &lt;br /&gt;
&lt;br /&gt;
Then restart the daemon: /etc/rc.d/init.d/xinetd restart &lt;br /&gt;
&lt;br /&gt;
Example from man page: Limit telnet sessions to 8 Mbytes of memory and a total 20 CPU seconds for child processes. &lt;br /&gt;
&lt;br /&gt;
service telnet&lt;br /&gt;
{&lt;br /&gt;
      socket_type         = stream&lt;br /&gt;
      wait                = no&lt;br /&gt;
      nice                = 10&lt;br /&gt;
      user                = root&lt;br /&gt;
      server              = /usr/etc/in.telnetd&lt;br /&gt;
      rlimit_as           = 8M&lt;br /&gt;
      rlimit_cpu          = 20&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[Pitfall] Red Hat 7.1 with updates as of 07/06/2001 required that I restart the xinetd services before FTP would work properly even though xinetd had started without failure during the boot sequence. I have no explanation as to why this occurs or how to fix it other than to restart xinetd: /etc/rc.d/init.d/xinetd restart. &lt;br /&gt;
&lt;br /&gt;
Man Pages: &lt;br /&gt;
xinetd &lt;br /&gt;
xinetd.conf &lt;br /&gt;
xinetd.log &lt;br /&gt;
tcpd &lt;br /&gt;
&lt;br /&gt;
For more info see: &lt;br /&gt;
macsecurity.org: xinetd tutorial - by curator &lt;br /&gt;
LinuxFocus.org: xinetd - Frederic Raynal &lt;br /&gt;
RedHat.com: Controlling Access to Services &lt;br /&gt;
http://www.xinetd.org &lt;br /&gt;
See RFC's: 862, 863, 864, 867, 868, 1413. &lt;br /&gt;
man page xinetd, xinetd.conf, xinetd.log &lt;br /&gt;
&lt;br /&gt;
RPC: Remote Procedure Calls (Portmapper)	&lt;br /&gt;
&lt;br /&gt;
Portmpper is a network service required to support RPC's. Many services such as NFS (file sharing services) require portmapper. &lt;br /&gt;
&lt;br /&gt;
List RPC services supported: [root]# rpcinfo -p localhost &lt;br /&gt;
&lt;br /&gt;
Starting portmap server: &lt;br /&gt;
/etc/rc.d/init.d/portmap start &lt;br /&gt;
service portmap start &lt;br /&gt;
&lt;br /&gt;
Man Pages: &lt;br /&gt;
portmap &lt;br /&gt;
rpcinfo &lt;br /&gt;
pmap_set &lt;br /&gt;
pmap_dump &lt;br /&gt;
&lt;br /&gt;
PAM: Network Wrappers:	&lt;br /&gt;
&lt;br /&gt;
Pluggable Authentication Modules for Linux (TCP Wrappers) &lt;br /&gt;
&lt;br /&gt;
This system allows or denies network access. One can reject or allow specific IP addresses or subnets to access your system. &lt;br /&gt;
&lt;br /&gt;
File: /etc/hosts.allow &lt;br /&gt;
&lt;br /&gt;
   in.ftpd:208.188.34.105&lt;br /&gt;
This specifically allows the given IP address to ftp to your system. One can also specify an entire domain. i.e. .name-of-domain.com &lt;br /&gt;
Note the beginning &amp;quot;.&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
File: /etc/hosts.deny &lt;br /&gt;
&lt;br /&gt;
   ALL:ALL&lt;br /&gt;
This generally denies any access. &lt;br /&gt;
&lt;br /&gt;
See the pam man page. &lt;br /&gt;
&lt;br /&gt;
File: /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  in.ftpd -l -a&lt;br /&gt;
&lt;br /&gt;
The inet daemon accepts the incoming network stream and assigns it to the PAM TCP wrapper, /usr/sbin/tcpd, which accepts or denies the network connection as defined by /etc/hosts.allow and /etc/hosts.deny and then passes it along to ftp. This is logged to /var/log/secure &lt;br /&gt;
&lt;br /&gt;
Advanced PAM: More specific access can be assigned and controlled by controlling the level of authentication required for access. &lt;br /&gt;
&lt;br /&gt;
Files reflect the inet service name. Rules and modules are stacked to achieve the level of security desired. &lt;br /&gt;
&lt;br /&gt;
See the files in /etc/pam.d/... (some systems use /etc/pam.conf) &lt;br /&gt;
&lt;br /&gt;
The format: service type control module-path module-arguments &lt;br /&gt;
auth - (type) Password is required for the user &lt;br /&gt;
nullok - Null or non-existatant password is acceptable &lt;br /&gt;
shadow - encrypted passwords kept in /etc/shadow &lt;br /&gt;
account - (type) Verifies password. Can track and force password changes. &lt;br /&gt;
password - (type) Controls password update &lt;br /&gt;
retry=3 - Sets the number of login attempts &lt;br /&gt;
minlen=8 - Set minimum length of password &lt;br /&gt;
session - (type) Controls monitoring &lt;br /&gt;
&lt;br /&gt;
Modules: &lt;br /&gt;
/lib/security/pam_pwdb.so - password database module &lt;br /&gt;
/lib/security/pam_shells.so - &lt;br /&gt;
/lib/security/pam_cracklib.so - checks is password is crackable &lt;br /&gt;
/lib/security/pam_listfile.so &lt;br /&gt;
&lt;br /&gt;
After re-configuration, restart the inet daemon: killall -HUP inetd &lt;br /&gt;
&lt;br /&gt;
For more info see: &lt;br /&gt;
Wietse's Papers &lt;br /&gt;
Pluggable Authentication Modules for Linux (PAM) Home Page &lt;br /&gt;
&lt;br /&gt;
ICMP:	&lt;br /&gt;
&lt;br /&gt;
ICMP is the network protocol used by the ping and traceroute commands. &lt;br /&gt;
&lt;br /&gt;
ICMP redirect packets are sent from the router to the host to inform the host of a better route. To enable ICMP redirect, add the following line to /etc/sysctl.conf : &lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.all.accept_redirects = 1 &lt;br /&gt;
&lt;br /&gt;
Add the following to the file: /etc/rc.d/rc.local &lt;br /&gt;
&lt;br /&gt;
for f in /proc/sys/net/ipv4/conf/*/accept_redirects&lt;br /&gt;
do&lt;br /&gt;
   echo 1 &amp;gt; $f &lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
Command to view Kernel IP routing cache: /sbin/route -Cn &lt;br /&gt;
&lt;br /&gt;
NOTE: This may leave you vulnerable to hackers as attackers may alter your routes. &lt;br /&gt;
&lt;br /&gt;
Blocking ICMP and look invisible to ping:	&lt;br /&gt;
&lt;br /&gt;
The following firewall rules will drop ICMP requests. &lt;br /&gt;
&lt;br /&gt;
Iptables: &lt;br /&gt;
&lt;br /&gt;
iptables -A OUTPUT -p icmp -d 0/0 -j DROP&lt;br /&gt;
Ipchains: &lt;br /&gt;
&lt;br /&gt;
ipchains -A output -p icmp -d 0/0 -j DENY&lt;br /&gt;
OR drop all incomming pings: &lt;br /&gt;
&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/icmp_echo_ignore_all&lt;br /&gt;
This is sometimes necessary to look invisible to DOS (Denial Of Service) attackers who use ping to watch your machine and launch an attack when it's pressence is detected &lt;br /&gt;
&lt;br /&gt;
Network Monitoring Tools:	&lt;br /&gt;
&lt;br /&gt;
tcpdump - dump traffic on a network. See discussion below. &lt;br /&gt;
Command line option	Description	&lt;br /&gt;
-c	Exit after receiving count packets.	&lt;br /&gt;
-C	Specify size of output dump files.	&lt;br /&gt;
-i	Specify interface if multiple exist. Lowest used by default. i.e. eth0	&lt;br /&gt;
-w file-name	Write the raw packets to file rather than parsing and printing them out.&lt;br /&gt;
They can later be printed with the -r option.	&lt;br /&gt;
-n	Improve speed by not performing DNS lookups. Report IP addresses.	&lt;br /&gt;
-t	Don't print a timestamp on each dump line.	&lt;br /&gt;
&lt;br /&gt;
Filter expressions: &lt;br /&gt;
primitive	Description	&lt;br /&gt;
host host-name	If host has multiple IP's, all will be checked.	&lt;br /&gt;
net network-number	Network number.	&lt;br /&gt;
net network-number mask mask	Network number and netmask specified.	&lt;br /&gt;
port port-number	Port number specified.	&lt;br /&gt;
tcp	Sniff TCP packets.	&lt;br /&gt;
udp	Sniff UDP packets.	&lt;br /&gt;
icmp	Sniff icmp packets.	&lt;br /&gt;
&lt;br /&gt;
Examples: &lt;br /&gt;
tcpdump tcp port 80 and host server-1 &lt;br /&gt;
tcpdump ip host server-1 and not server-2 &lt;br /&gt;
iptraf - Interactive Colorful IP LAN Monitor &lt;br /&gt;
nmap - Network exploration tool and security scanner &lt;br /&gt;
List pingable nodes on network: nmap -sP 192.168.0.0/24 &lt;br /&gt;
Scans network for IP addresses 192.168.0.0 to 192.168.0.255 using ping. &lt;br /&gt;
Ethereal - Network protocol analyzer. Examine data from a live network. &lt;br /&gt;
&lt;br /&gt;
RPM's required: &lt;br /&gt;
ethereal-0.8.15-2.i386.rpm - Red Hat 7.1 Powertools CD RPM &lt;br /&gt;
ucd-snmp-4.2-12.i386.rpm - Red Hat 7.1 binary CD 1 &lt;br /&gt;
ucd-snmp-utils-4.2-12.i386.rpm - Red Hat 7.1 binary CD 1 &lt;br /&gt;
Also: gtk+, glib, glibc, XFree86-libs-4.0.3-5 (base install) &lt;br /&gt;
There is an error in the ethereal package because it does not show the snmp libraries as a dependancies, but you can deduce this from the errors that you get if the ucd-snmp libraries are not installed. &lt;br /&gt;
EtherApe - Graphical network monitor for Unix modeled after etherman. This is a great network discovery program with cool graphics. (Red Hat Powertools CD 7.1) &lt;br /&gt;
Gkrellm - Network and system monitor. Good for monitoring your workstation. (Red Hat Powertools CD) &lt;br /&gt;
IPTraf - ncurses-based IP LAN monitor. (Red Hat Powertools CD) &lt;br /&gt;
Cheops - Network discovery, location, diagnosis and management. Cheops can identify all of the computers that are on your network, their IP address, their DNS name, the operating system they are running. Cheops can run a port scan on any system on your network. (Red Hat Powertools CD) &lt;br /&gt;
ntop - Shows network usage in a way similar to what top does for processes. Monitors how much data is being sent and received on your network. (Red Hat Powertools CD) &lt;br /&gt;
MRTG - Multi Router Traffic Grapher - Monitor network traffic load using SNMP and generate an HTML/GIF report. (See sample output) &lt;br /&gt;
scotty - Obtain status and configuration information about your network. Supports SNMP, ICMP, DNS, HTTP, SUN RPC, NTP, &amp;amp; UDP. (Red Hat Powertools CD) &lt;br /&gt;
Big Brother - Monitoring ans services availablility. &lt;br /&gt;
OpenNMS.org - Network Management using SNMP. Also see Blast.com: OpenNMS &lt;br /&gt;
Nagios - host, service and network monitoring &lt;br /&gt;
Caldera guide - Network Monitoring Tools &lt;br /&gt;
Angel network monitor &lt;br /&gt;
Bing: Measure bandwidth between two systems - Bandwidth ping &lt;br /&gt;
&lt;br /&gt;
Using tcpdump to monitor the network:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root@node prompt]# ifconfig eth0 promisc          - Put nic into promiscuous mode to sniff traffic.&lt;br /&gt;
[root@node prompt]# tcpdump -n host not XXX.XXX.XXX.XXX | more    - Sniff traffic but ignore IP address which is your remote session.&lt;br /&gt;
[root@node prompt]# ifconfig eth0 -promisc         - Pull nic out of promiscuous mode.&lt;br /&gt;
&lt;br /&gt;
Network Intrusion and Hacker Detection Systems:	&lt;br /&gt;
&lt;br /&gt;
SNORT: Monitor the network, performing real-time traffic analysis and packet logging on IP networks for the detection of an attack or probe. &lt;br /&gt;
Linux Journal: Planning IDS for Your Enterprise - Nalneesh Gaur &lt;br /&gt;
Snort overview - Drew Beach &lt;br /&gt;
InterSect Alliance - Intrusiuon analysis. Identifies malicious or unauthorized access attempts. &lt;br /&gt;
&lt;br /&gt;
Configuring Linux For Network Multicast:	&lt;br /&gt;
&lt;br /&gt;
Regular network exchanges of data are pier to pier unicast transactions. An HTTP request to a web server (TCP/IP), email SNMP (TCP/IP), DNS (UDP), FTP (TCP/IP), ... are all pier to pier unicast transactions. If one wants to transmit a video, audio or data stream to multiple nodes with one transmission stream instead of multiple individual pier to pier connections, one for each node, one may use multicasting to reduce network load. Note that multicast and a network broadcast are different. Multicast messages are only &amp;quot;heard&amp;quot; by the nodes on the network that have &amp;quot;joined the multicast group&amp;quot; which are those that are interested in the information. &lt;br /&gt;
&lt;br /&gt;
The Linux kernel is full Level-2 Multicast-Compliant. It meets all requirements to send, receive and act as a router for multicast datagrams. For a process to receive multicast datagrams it has to request the kernel to join the multicast group and bind the port receiving the datagrams. When a process is no longer interested in the multicast group, a request is made to the kernel to leave the group. It is the kernel/host which joins the multicast group and not the process. Kernel configuration requires &amp;quot;CONFIG_IP_MULTICAST=y&amp;quot;. In order for the Linux kernel to support multicast routing, set the following in the kernel config: &lt;br /&gt;
CONFIG_IP_MULTICAST=y &lt;br /&gt;
CONFIG_IP_ROUTER=y &lt;br /&gt;
CONFIG_IP_MROUTE=y &lt;br /&gt;
CONFIG_NET_IPIP=y &lt;br /&gt;
&lt;br /&gt;
Note that on multihomed systems (more than one IP address/network card), only one device can be configured to handle multicast. &lt;br /&gt;
&lt;br /&gt;
Class D networks with a range of IP addresses from 224.0.0.0 to 239.255.255.255 (See Network Classes above) have typically been reserved for multicast. &lt;br /&gt;
&lt;br /&gt;
Usefull commands: &lt;br /&gt;
Command	Description	&lt;br /&gt;
cat /proc/net/igmp	List multicast group to which the host is subscribed.	&lt;br /&gt;
ping 224.0.0.1	All hosts configured for multicast will respond with their IP addresses	&lt;br /&gt;
ping 224.0.0.2	All routers configured for multicast will respond	&lt;br /&gt;
ping 224.0.0.3	All PIM routers configured for multicast will respond	&lt;br /&gt;
ping 224.0.0.4	All DVMRP routers configured for multicast will respond	&lt;br /&gt;
ping 224.0.0.5	All OSPF routers configured for multicast will respond	&lt;br /&gt;
&lt;br /&gt;
Multicast transmissions are achieved through proper routing, router configuration (if communicating through subnets) and programatically with the use of the following &amp;quot;C&amp;quot; function library calls: &lt;br /&gt;
Function Call	Description	&lt;br /&gt;
setsockopt()	Pass information to the Kernel.	&lt;br /&gt;
getsockopt()	Retrieve information broadcast using multicast.	&lt;br /&gt;
For more on multicast programming see: Multicast Howto. &lt;br /&gt;
&lt;br /&gt;
The multicast application will specify the multicast loopback interface, TTL (network time to live), network interface and the multicast group to add or drop. &lt;br /&gt;
Add route to support multicast: &lt;br /&gt;
route add 224.0.0.0 netmask 240.0.0.0 dev eth0 &lt;br /&gt;
&lt;br /&gt;
Living in a MS/Windows World:	&lt;br /&gt;
&lt;br /&gt;
In Nautilus use the URL &amp;quot;smb:&amp;quot; to view MS/Windows servers. &lt;br /&gt;
&lt;br /&gt;
LinNeighborhood: Linux workstation gui tool. &lt;br /&gt;
&lt;br /&gt;
Make your life simple and use the GUI/File Manager LinNeighborhood. It uses smbmount, samba and smbclient to give you access to MS/Windows servers and printers. &lt;br /&gt;
LinNeighborhood Home Page &lt;br /&gt;
LinNeighborhood Screen Shot &lt;br /&gt;
See the YoLinux tutorial on integrating Linux into a Microsoft network. &lt;br /&gt;
&lt;br /&gt;
Network Definitions:	&lt;br /&gt;
&lt;br /&gt;
IPv4: Most of the Internet servers and personal computers use Internet Protocol version 4 (IPv4). This uses 32 bits to assign a network address as defined by the four octets of an IP address up to 255.255.255.255. Which is the representation of four 8 bit numbers thus totaling 32 bits. &lt;br /&gt;
IPv6: Internet Protocol version 6 (IPv6) uses a 128 bit address and thus billions and billions of potential addresses. The protocol has also been upgraded to include new quality of service features and security. Currently Linux supports IPv6 but IPv4 is used when connecting your computer to the internet. &lt;br /&gt;
TCP/IP: (Transmission Control Protocol/Internet Protocol) uses a client - server model for communications. The protocol defines the data packets transmitted (packet header, data section), data integrity verification (error detection bytes), connection and acknowledgement protocol, and re-transmission. &lt;br /&gt;
TCP/IP time to live (TTL): This is a counting mechanism to determine how long a packet is valid before it reaches its destination. Each time a TCP/IP packet passes through a router it will decrement its TTL count. When the count reaches zero the packet is dropped by the router. This ensures that errant routing and looping aimless packets will not flood the network. &lt;br /&gt;
MAC Address: (media access control) is the network card address used for communication between other network devices on the subnet. This info is not routable. The ARP table maps TCP/IP address (global internet) to the local hardware on the local network. Use the command /sbin/ifconfig to view both the IP address and the MAC address. The MAC address uniquely identifies each node of a network and is used by the Ethernet protocol. &lt;br /&gt;
Full Duplex: Allows the simultaneous sending and receiving of packets. Most modern modems support full duplex. &lt;br /&gt;
Half Duplex: Allows the sending and receiving of packets in one direction at a time only. &lt;br /&gt;
OSI 7 Layer Model: The ISO (International Standards Organization) has defined the OSI (Open Systems Interconnection) model for current networking protocols. &lt;br /&gt;
OSI Layer	Description	Linux Networking Use 	&lt;br /&gt;
7	Application Layer.&lt;br /&gt;
The top layer for communications applications like email and the web.	telnet, web browser, sendmail	&lt;br /&gt;
6	Presentation Layer.&lt;br /&gt;
Syntax and format of data transfer.	SMTP, http	&lt;br /&gt;
5	Session Layer.	&lt;br /&gt;
	&lt;br /&gt;
4	Transport Layer.&lt;br /&gt;
Connection, acknowledgement and data packet transmission.	TCP&lt;br /&gt;
UDP	&lt;br /&gt;
3	Network Layer.	IP&lt;br /&gt;
ARP	&lt;br /&gt;
2	Data Link Layer.&lt;br /&gt;
Error control, timing	Ethernet	&lt;br /&gt;
1	Physical Layer.&lt;br /&gt;
Electrical characteristics of signal and NIC	Ethernet	&lt;br /&gt;
Network Hub: Hardware to connect network devices together. The devices will all be on the same network and/or subnet. All network traffic is shared and can be sniffed by any other node connected to the same hub. &lt;br /&gt;
Network Switch: Like a hub but creates a private link between any two connected nodes when a network connection is established. This reduces the amount of network collisions and thus improves speed. Broadcast messages are still sent to all nodes. &lt;br /&gt;
&lt;br /&gt;
Related Links:	&lt;br /&gt;
&lt;br /&gt;
Linux Network Management - Georgia Tech (Slovak mirror) &lt;br /&gt;
Linux Network Commands &lt;br /&gt;
Cable modem HowTo - Vladimir Vuksan &lt;br /&gt;
Ethernet HowTo - Paul Gortmaker &lt;br /&gt;
YoLinux Tutorial: Setting up an internet gateway for home or office using iptables &lt;br /&gt;
Firewall HowTo - Mark Grennan &lt;br /&gt;
ipchains HowTo - Paul Russell &lt;br /&gt;
Networking Overview HowTo - Daniel Lopez Ridruejo &lt;br /&gt;
Networking Howto - Joshua Drake &lt;br /&gt;
NIS Howto - Thorsten Kukuk &lt;br /&gt;
NFS Howto - Nicolai Langfeldt &lt;br /&gt;
SNMP: Simple Network Management Protocol (Uses ports 161,162,391,1993) &lt;br /&gt;
SNMP - Intro and tutorials &lt;br /&gt;
Linux SNMP Network Management Tools &lt;br /&gt;
SNMP FAQ &lt;br /&gt;
net-snmp - tools and libraries &lt;br /&gt;
News/Usenet Group: comp.os.linux.networking - Deja &lt;br /&gt;
MARS-nwe - Netware emulator &lt;br /&gt;
Caldera: Netware for Linux - Includes full NDS &lt;br /&gt;
Linux 2.4 Advanced Routing HOWTO - iproute2, traffic shaping and a bit of netfilter &lt;br /&gt;
ATM: &lt;br /&gt;
ATM on Linux &lt;br /&gt;
ISDN: &lt;br /&gt;
ISDN4LINUX FAQ - Matthias Hessler &lt;br /&gt;
ISDN4 Linux Home Page &lt;br /&gt;
ISDN Solutions for Linux &lt;br /&gt;
Examples of ISDN for LINUX Installations &lt;br /&gt;
Dan Kegel's ISDN Page &lt;br /&gt;
DSL: &lt;br /&gt;
DSLreports.com: Reviews of DSL providers, bandwidth speed measurement, Tools, Info &lt;br /&gt;
PPP: Point-to-Point Protocol &lt;br /&gt;
YoLinux Tutorial: Configuring PPP dial up connections to an ISP &lt;br /&gt;
YoLinux Tutorial: Dialing Compuserve &lt;br /&gt;
YoLinux Tutorial: Dialing AOL &lt;br /&gt;
YoLinux Tutorial: Configuring PPP dial-in connections &lt;br /&gt;
PPTP: Point-to-Point Tunneling Protocol &lt;br /&gt;
RFC 2637: Point-to-Point Tunneling Protocol (PPTP). &lt;br /&gt;
PoPToP - PPTP server for Linux. &lt;br /&gt;
PPTP-Linux Client - A PPTP Linux client that allows a linux system to connect to a PPTP server. Developed by C. S. Ananian. &lt;br /&gt;
Counterpane Systems FAQ on Microsoft's PPTP Implementation - FAQ on the security flaws in Microsoft's PPTP Implementation. &lt;br /&gt;
DHCP: (Dynamic Host Configuration Protocol) &lt;br /&gt;
YoLinux DHCP Tutorial - How to set up a DHCP server. &lt;br /&gt;
ISC Dynamic Host Configuration Protocol - DHCP home page &lt;br /&gt;
Multicast: &lt;br /&gt;
YoLinux Tutorial: Configuring Linux for multicast - this tutorial in section above &lt;br /&gt;
Multicast over TCP/IP HOWTO &lt;br /&gt;
ISP's: (National/Global) &lt;br /&gt;
TheList.com - Comprehensive list of ISP's &lt;br /&gt;
Earthlink &lt;br /&gt;
Concentric &lt;br /&gt;
ATT Worldnet &lt;br /&gt;
NIS: (NFS infrastructure) &lt;br /&gt;
NIS Statup Instructions &lt;br /&gt;
Ethernet cables: &lt;br /&gt;
Making CAT 3, 5, 5E RJ45 Ethernet Cables &lt;br /&gt;
Wiring and Installation &lt;br /&gt;
Gigabit Ethernet &lt;br /&gt;
VIX: Vienna Internet eXchange - European traffic exchange for ISP's &lt;br /&gt;
&lt;br /&gt;
Test Internet Bandwidth: &lt;br /&gt;
Test the speed of your connection by selecting this link - or this link (pick tachometer icon) &lt;br /&gt;
Bandwidth tests and large file transfers &lt;br /&gt;
Bandwidth explained and List of bandwidth test sites &lt;br /&gt;
System monitor gkrellm - Monitors speed/bandwidth &lt;br /&gt;
&lt;br /&gt;
Man Pages: &lt;br /&gt;
icmp - Linux IPv4 ICMP kernel module &lt;br /&gt;
ifport - select the transceiver type for a network interface &lt;br /&gt;
usernetctl - allow a user to manipulate a network interface if permitted &lt;br /&gt;
arp - manipulate the system ARP cache &lt;br /&gt;
Shows other systems on your network (including IP address conflicts): arp -a &lt;br /&gt;
Show ARP table Linux style: arp -e &lt;br /&gt;
List ARP table: cat /proc/net/arp &lt;br /&gt;
ripquery - query RIP (Routing Information Protocol) gateways &lt;br /&gt;
gated - gateway routing daemon&lt;/div&gt;</summary>
		<author><name>DerKMix</name></author>	</entry>

	</feed>