Escolar Documentos
Profissional Documentos
Cultura Documentos
Naveen.M.K, Protocol Engineering & Technology Unit, Electrical Engineering Department, Indian Institute of Science, Bangalore - 12.
Outline
Basiclinuxnetworkingcommands
ServersSetup
Troubleshooting
Ifconfig
Ifconfig
``ipcommand
``routecommand
NICConfiguration
/etc/init.d/networkstart/stopcommand systemconfignetworkcommand
LinuxFirewallConfiguration
Using``iptablesand``systemconfigsecuritylevel
Statefulpacketinspection FilteringpacketsbasedonaMACaddressandthevalues oftheflagsintheTCPheader Systemloggingthatprovidestheoptionofadjustingthe levelofdetailofthereporting Betternetworkaddresstranslation SupportfortransparentintegrationwithsuchWebproxy programsasSquid Aratelimitingfeaturehelpsiptablesblocksometypesof denialofservice(DoS)attacks.
iptables execution
LinuxFirewallConfiguration
Using``iptables
ipchainsrulesexamples
iptablesAINPUTs0/0ieth0d192.168.1.1pTCPjACCEPT iptablesisbeingconfiguredtoallowthefirewalltoacceptTCPpackets cominginoninterfaceeth0fromanyIPaddressdestinedforthe firewall'sIPaddressof192.168.1.1.The0/0representationofanIP addressmeansany. iptablesAFORWARDs0/0ieth0d192.168.1.58oeth1pTCP sport1024:65535dport80jACCEPT iptablesisbeingconfiguredtoallowthefirewalltoacceptTCPpackets forroutingwhentheyenteroninterfaceeth0fromanyIPaddressand aredestinedforanIPaddressof192.168.1.58thatisreachablevia interfaceeth1.Thesourceportisintherange1024to65535andthe destinationportisport80(www/http).
SERVERS WEB,FTP,DHCP.
ApacheWebServer
<Directory /var/www/html> order deny,allow deny from all allow from 10.10.64 </Directory> ErrorDocument 404 /error.html DocumentRoot /var/www/html
FTPServer
Using``vsftpd Thevsftpd.confFile VSFTPDrunsasananonymousFTPserver. VSFTPDallowsonlyanonymousFTPdownloadstoremoteusers, notuploadsfromthem VSFTPDdoesn'tallowanonymoususerstocreatedirectorieson yourFTPserver VSFTPDlogsFTPaccesstothe/var/log/vsftpd.loglogfile BydefaultVSFTPDexpectsfilesforanonymousFTPtobeplaced inthe/var/ftpdirectory. Limitingthemaximumnumberofclientconnections(max_clients)
DHCP:dhcpdanddhclient
dhcpdanddhclient
dhclientoutput
dhcpd.confanddhclient.conf
dhcpd.confanddhclient.conf
dhclient.conffilecanbeusedtoconfigurethebehaviourof theclientinawidevarietyofways: protocoltiming,informationrequestedfromtheserver informationrequiredoftheserver defaultstouseiftheserverdoesnotprovidecertain information valueswithwhichtooverrideinformationprovidedbythe server, valuestoprependorappendtoinformationprovidedbythe server.Theconfigurationfilecanalsobepreinitializedwith addressestouseonnetworksthatdon'thaveDHCPservers.
dhcpd.confanddhclient.conf
dhcpd.confanddhclient.conf
Troubleshooting
Tcpdump
Tcpdumpprintsouttheheadersofpacketsonanetwork interfacethatmatchthebooleanexpression.
Ethereal
TCPDUMP
Ethereal
Ethereal
Ethereal