0% found this document useful (0 votes)
36 views

Internet Conn

This document provides an overview of basic Linux networking commands and configuration. It discusses the ifconfig, route, and ip commands for network interface configuration. It also covers setting up Apache and FTP servers. The document explains Linux firewall configuration using iptables, including common rules. It concludes with sections on using tcpdump and ethereal tools for network troubleshooting.

Uploaded by

srinivasakh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Internet Conn

This document provides an overview of basic Linux networking commands and configuration. It discusses the ifconfig, route, and ip commands for network interface configuration. It also covers setting up Apache and FTP servers. The document explains Linux firewall configuration using iptables, including common rules. It concludes with sections on using tcpdump and ethereal tools for network troubleshooting.

Uploaded by

srinivasakh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Linux Networking Basics

Naveen.M.K,
Protocol Engineering & Technology Unit,
Electrical Engineering Department,
Indian Institute of Science,
Bangalore - 12.
Outline

Basic linux networking commands
– ifconfig, route, ip

Servers Setup
– apache, ftp

Troubleshooting
– tcpdump and ethereal
Ifconfig


Ifconfig  is used to configure the kernel­resident 
network interfaces.  It is used at boot time to set 
up   interfaces as necessary.  After that, it is 
usually only needed when debugging or when 
system  tuning  is needed.

Options:
– interface
– up
– down
– netmask
Ifconfig
``ip’’ command
``route’’ command
NIC Configuration

/etc/init.d/network start/stop command

system­config­network command
Linux Firewall Configuration

Using ``iptables’’ and ``system­config­securitylevel’’

– Stateful packet inspection
– Filtering packets based on a MAC address and the values 
of the flags in the TCP header
– System logging that provides the option of adjusting the 
level of detail of the reporting
– Better network address translation
– Support for transparent integration with such Web proxy 
programs as Squid
– A rate limiting feature helps iptables block some types of 
denial of service (DoS) attacks.
iptables
execution
Linux Firewall Configuration

Using ``iptables’’
– ACCEPT
– DROP
– REJECT
– LOG
– DNAT
– SNAT
– MASQUERADE: Used to SNAT.
ipchains rules examples

iptables ­A INPUT ­s 0/0 ­i eth0 ­d 192.168.1.1  ­p TCP ­j ACCEPT

iptables is being configured to allow the firewall to accept TCP packets 
coming in on interface eth0 from any IP address destined for the 
firewall's IP address of 192.168.1.1. The 0/0 representation of an IP 
address means any.


iptables ­A FORWARD ­s 0/0 ­i eth0 ­d 192.168.1.58 ­o eth1 ­p TCP 
­­sport 1024:65535 ­­dport 80 ­j ACCEPT

iptables is being configured to allow the firewall to accept TCP packets 
for routing when they enter on interface eth0 from any IP address and 
are destined for an IP address of 192.168.1.58 that is reachable via 
interface eth1. The source port is in the range 1024 to 65535 and the 
destination port is port 80 (www/http).
SERVERS

WEB, FTP, DHCP.
Apache Web Server

Download and install: http://httpd.apache.org/

Configuration files

httpd.conf, access.conf. and srm.conf 

<Directory /var/www/html>
order deny,allow
deny from all
allow from 10.10.64
</Directory>
ErrorDocument 404 /error.html
DocumentRoot /var/www/html
FTP Server

Using ``vsftpd’’


The vsftpd.conf File
– VSFTPD runs as an anonymous FTP server.
– VSFTPD allows only anonymous FTP downloads to remote users, 

not uploads from them
– VSFTPD doesn't allow anonymous users to create directories on 

your FTP server
– VSFTPD logs FTP access to the /var/log/vsftpd.log log file
– By default VSFTPD expects files for anonymous FTP to be placed 

in the /var/ftp directory.
– Limiting the maximum number of client connections (max_clients)
DHCP: dhcpd and dhclient

dhcpd ­ Dynamic Host Configuration Protocol 
Server 

Implements the Dynamic Host Configuration 
Protocol (DHCP) and the Internet Bootstrap 
Protocol (BOOTP). DHCP allows hosts on a 
TCP/IP network to request and be assigned IP 
addresses, and also to discover information about 
the network to which they are attached.

#[PATH­TO­DHCPD]dhcpd {start|stop|restart|status}
dhcpd and dhclient


DHCP Client, dhclient, provides a means for 
configuring one or more network interfaces using 
the Dynamic Host Configuration Protocol, 
BOOTP protocol, or if these protocols fail, by 
statically assigning an address.

● #[PATH­TO­dhclient]dhclient
dhclient output
dhcpd.conf and dhclient.conf


dhcpd.conf file contains configuration information 
for dhcpd

Keywords:
– default­lease­time, max­lease­time
– subnet, netmask, range, routers
– domain­name, domain­name­servers
dhcpd.conf and dhclient.conf

dhclient.conf file can be used to configure the behaviour of 
the client in a wide variety of ways: 

protocol timing, information requested from the server

information required of the server

defaults to use if the server does not provide certain 
information

values with which to override information provided by the 
server,

values to prepend or append to information provided by the 
server. The configuration file can also be preinitialized with 
addresses to use on networks that don't have DHCP servers.  
dhcpd.conf and dhclient.conf
dhcpd.conf and dhclient.conf
Troubleshooting

Tcpdump
– Tcpdump prints out the headers of packets on a network 
interface that match the boolean expression.


Ethereal
– Protocol analyzer, or "packet sniffer" software, used for 
network troubleshooting, analysis, software and protocol 
development, and education. It has all of the standard 
features of a protocol analyzer.
TCPDUMP
Ethereal
Ethereal
Ethereal

You might also like