WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf ·...

25
WELCOME TO SS-E AFNOG - 2017 NAIROBI, KENYA Scalable Services – English

Transcript of WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf ·...

Page 1: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

WELCOMETOSS-EAFNOG - 2017NAIROBI,KENYAScalableServices– English

Page 2: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

WhatisSS-E?§ ScalableServices– Englishisatrackthatteachesadvancedtopicsondesigning,configuringandmanaginglargescaleInternetServicesrunonUNIX/Linuxservers

§ ItbuildsonTrackZerowhichcoveredintroductorytopicsonUNIX/LinuxandInternetServices

§Whatsortofservices?§ DNS,Web,Email§ Monitoring,Authentication§ ManyOthers

§ BasicallyanyservicethatcanbeofferedonaLinux/UNIXserverovertheInternet

Page 3: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Yourinstructors§ Ayitey A.Bulley - Ghana§ FrankKuse – Ghana§ IsabellaOdida – Uganda§ JoeAbley – Canada§ KevinChege– Kenya§MichukiMwangi– fromKenya

Page 4: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Howaboutyou….?Introduceyourself:§Name§Country§Work§HobbiesJ§HowdidyouflytogettoNairobi?

Page 5: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Courseteachingstyle§Theoryexplainedfirstthenfollowedbyapracticalsession

§EachofyouhasbeenassignedaVirtualMachinerunningDebian 8.8(Jessie)thatyouwillaccessfromyourlaptop

§Feelfreetoaskquestionsanytime§ Ifyouneedhelpduringthepracticallabs,raiseyourhandsotheinstructorscanassist

§KindlymuteyourphonesduringclassesJ§PleasepayduringtheorysessionsJ

Page 6: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Timetable– pleasekeeptimeJ§ Breakfastatthehotelstartsat6am*

§ FirstSession09:00to11:00§ Teabreak11:00to11:00

§ SecondSessionfrom11:30to13:00§ Lunchfrom13:00to14:00

§ ThirdSession- from14:00to16:00§ Teabreak– 16:00to16:30

§ FourthSession– 16:30to18:00§ Dinner

§ Eveningsessions– 20:00– 22:00

Breakfast:AttheBoma HotelorBoma InnLunchanddinner:OnthegroundflooroftheconferencefacilityTeabreak:InthecorridoroutsidethelectureroomsWashrooms:TotherightwhenyouexitfromKIFARU(closetothesecretariat)

Page 7: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

InventoryYoushouldhavereceived:§Namebadges§Folderwithnotepad,pen,informationpack

KeepyournamebadgewithyouAttheendoftheweekyouwillreceive:§AUSBstickwithsomeO'ReillyeBooks

Pleasesharewithyourcolleaguesbackathome.

Page 8: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Connectivity§Useyourownlaptopsfor:§Webbrowsing§Controlyourvirtualmachines§Virtualizationexercises

§WirelessInternet§UsetheAISoryoucoursenetworkSSID§Passwordforbothis"success!”

§Hotelwifi isavailableinyourrooms

Page 9: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

AccessYourVirtualMachines§ Virtualservers(namedpc1– pc35)

§ DNSnamesarepc1.sse.ws.afnog.org(etc)§ PCAssignmentexercise

§ Debian 8.8OSinstalled§ UseSSHtoaccessyourserver(e.g.PuttyforWindows)§ Loginwithafnog/afnog§ Usesudo toexecutecommandsasroot§ Don'tchangepasswords§ Don't"closesecurityholes"§ Don't shutdown yourserver(there'snopowerbutton!)§ YourserversareaccessibleovertheInternet

Page 10: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

WindowsUsers§ Installputtyfrom:http://www.ws.afnog.org/afnog2016/unix-intro/downloads/

Afterdownloadingyouwillseetheaboveicon.Doubleclickonitandyoushouldseeawindowsimilartotheoneontheright

Page 11: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Unix,LinuxandOSXUsers§ AdefaultSecureShell(SSH)clientisalreadyinstalledinUnix,LinuxandOSX

§ ToaccessthedefaultSSH§ Open:Terminalapplication§ FromTerminalprompttypethefollowing;§ [email protected] whereXisthepcnumber.

Page 12: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

OnlineResourcesWebsite: http://www.ws.afnog.org/afnog2017/AfNOG MailingList:§Q&AonInternetoperationalandtechnicalissues.§Nofoullanguageordisrespectforotherparticipants.§Noblatantproductmarketing.§Nopoliticalpostings.

Please subscribe whileattheWorkshop:§ Sowecanhelpyouifyouhaveproblemssubscribing.

Pleaseraiseanyquestionsrelatedtotheworkshopcontent.

Page 13: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

SafetyPleasebecarefulinclass:§triponpowercords§pullcablesoutofsockets§knockequipmentofftables§fallfromleaningbacktoofarinyourchair

Page 14: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Coretopicstobecoveredthisweek§DNS

§ Resolver§ AuthoritativeDNS

§ FirewallsandNetworkSecurity§ HostsecurityusingIPtables

§MailServices§ Howtosetupmailservices

§HostingWebservices§ WebserverusingApache

§RADIUS&LDAP§ Forcentralizingauthentication

§Virtualization§ Howtobuildvirtualservers

Page 15: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Roughagendafortheweek§ Monday:

§ FirstSession:intro, nano bootcamp,Post-installationBestPractices§ SecondSession:DNS(Intro)§ ThirdSession:FirewallsandNetworkSecurity§ FourthSession:DNS(Resolver)

§ EveningSession:General

§ Tuesday:§ FirstSession:Security(PublicKey,SSL,PGP,Crypto)§ Second:DNS(Authoritative)§ ThirdSession:Apache+PHP§ FourthSession:Postfix

§ EveningSession:DNSSEC

§ Wednesday:§ FirstandSecondSession:Postfix§ ThirdandFourthSession:OpenLDAPDirectory

§ EveningSession:Ansible

Page 16: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Roughagendafortheweek…§ Thursday:

§ FirstandSecondSession:RADIUS§ ThirdSession:DovecotIMAP§ FourthSession:Squirrelmail

§ Friday:§ FirstandSession:LoadBalancing§ ThirdandFourth:Virtualization§ ClosingSurvey

Page 17: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Anyquestions?

Page 18: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Nanobootcamp§Wewilluseaneditorcalled“nano”ontheDebian machines§ However,youshouldlearn“vi”asithaswaymorefeaturesthanmosteditors

§ Installnano: afnog@pcX :~$sudo apt-getinstallnano§ Fornano youcanopenafileby:

afnog@pcX :~$nano /path/to/filenameOR afnog@pcX :~$nano filenameSavethechangesby:

ctrlXanswer“y”

Searchthefileforaspecificword:ctrlW <thenthesearchterm>

Page 19: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Shortnano exercise§ Gotoyourhomedirectory

afnog@pcX :~$cd/home/afnog§ Openafile:

afnog@pcX :~$nano test-script.sh

§ Typethefollowing4linesinthefile#!/bin/bash#SSETestScriptecho"Welcome$HOSTNAMEtoAfNOG SSE2017!”echo“AfNOG!,Success!”

§ ThenSaveandExitCtrlX andThenanswery.Maintainthesamefilename(pressenter)

§ Changethefilespermissionsafnog@pcX :~$chmod +xtest-script.sh

§ Runthefileafnog@pcX :~$./test-script.sh

Page 20: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Morecommands§Ctrly– previousPage§Ctrlv– nextpageNanoprovidesamenuatthebottom:

Page 21: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

POST-INSTALLBESTPRACTICES

Page 22: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Thingstodopost-install§ 1.UpdatetheSystem

afnog@pcX :~$sudo nano /etc/apt/sources.list

Finddebhttp://httpredir.debian.org/debian jessie maindebhttp://security.debian.org/ jessie/updatesmain

Add“contrib”and“non-free”repositoriestolookasfollows(usetabkey);

debhttp://httpredir.debian.org/debian jessie maincontrib non-freedebhttp://security.debian.org/jessie/updatesmaincontrib non-free

Savethefileandexit

Page 23: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Thingstodopost-install§ 2.UpdatetheSystem

afnog@pcX:~$sudo apt-getupdateafnog@pcX:~$sudo apt-getupgrade

§ 3.InstallSSH(Ifitwasnotinstalledduringsysteminstallation)afnog@pcX:~$sudo apt-getinstallopenssh-server

§ 4.DisableunwantedServicesafnog@pcX :~$sudo service- - status-allafnog@pcX :~$sudo serviceexim4stop

§ 5.CheckListeningNetworkPortsafnog@pcX :~$sudo netstat –tulpn

Page 24: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Thingstodopost-install§ 6.DisableRemoteSSHRootUserLogin

afnog@debian8:~$sudo nano /etc/ssh/sshd_config§ ChangelineorifmissingAddtheline(use§ PermitRootLogin without-password à PermitRootLogin noafnog@debian8:~$sudo servicesshd restart

§ 7.ConfigureNTPServerafnog@debian8:~$sudo apt-getinstallntp§ (optionalbutnecessary)Editntp serversandputlocalonesafnog@debian8:~$sudo nano /etc/ntp.conf

§ Comment“server”sectionsorreplaceserverwithalocal/internaloneafnog@debian8:~$sudo servicentp startafnog@debian8:~$ntpdc –pnafnog@debian8:~$ntpq –pn

§ Morehere:https://www.debian.org/doc/manuals/securing-debian-howto/

Page 25: WELCOME TO SS-E AFNOG-2017 NAIROBI, KENYAafnog.github.io/sse/intro/IntroPresentation.pdf · Timetable –please keep time J §Breakfast at the hotel starts at 6am* §First Session

Thankyou!

Questions?