Tải bản đầy đủ - 0 (trang)
Chapter 46. Virtual Private Networks (VPNs) and Tunneling

Chapter 46. Virtual Private Networks (VPNs) and Tunneling

Tải bản đầy đủ - 0trang

WhatIsaVPN?

Basically,aVPNisnothingmorethanasecurepaththrougha

sharednetworkorWANthatconnectstwocomputers,ortwo

networks,sothatfromthepointofviewofeachendpointofthe

connection,theyareonthesamenetwork.Theconnectionis

privatebecausesomemeanshavebeentakentosecurethe

payloadinformationofthedatacarriedthroughthisvirtual

tunnel.

AVPNcanbeagoodsolutionforsecurityissuesinmany

scenarios:

EmployeeswhoworkfromhomeandusetheInternetto

communicatewiththecompanynetwork

MobileemployeeswhotravelandcandialintotheInternet

usinganationalISP

BranchofficesusingtheInternet

Businesspartners,customers,oreventechnicalsupport

staffwhoneedaccess

Asthislistdemonstrates,twobasictypesofVPNsareused:

RemoteaccessVPNAconnectionbetweenaremote

computerandtheInternet.

Site-to-siteVPNAconnectionbetweentwonetworks,

whichusuallyisdonebetweentworouters,orinsome

casesfirewall/routercombinations.



TheMobileWorkforce

Manypeopleareonthemoveinthebusinessworldtoday,and

manycompaniesareallowingsomeemployeestoworkfrom

home.Atechniquestillusedtoday,butwhichisdeclining,isto

setupabankofmodemsandgivedial-inaccesstocertain

people,suchassalesmen,whoarealwaysonthemove.Fora

businessthatneedsdataconnectionstobranchofficesbutcan't

justifythecostofleasedlines,modembanksprovidethe

necessaryremoteconnection.Youcanhostabankofmodems

undermanydifferentoperatingsystems,fromUnix(withits

efficientkernelandsupportforlargenumbersofserialdevices)

toWindows2000/2003(usingtheremoteaccessservice

[RAS]).Youevencaninstallserversthatarebasically

appliancesthatactasafrontendtoprovideabankofmodems

fordial-inservices.

However,maintainingabankofmodemscanbeexpensive

becauseeachmodemneedsatelephoneline,whichisan

ongoingcost.Thereareseveralsecurityissuestobe

considered.Forexample,whathappensifsomeonediscovers

thetelephonenumberofyourdial-upaccess?Itwouldthenbe

easytouseapassworddictionaryattacktobreakintothe

network.

However,sometimesasimpledial-inmodemisnotthebest

solution.WithInternetaccessavailablealmostanywhereinthe

UnitedStates,Europe,Japan,andmanyothercountries,the

Internetcanbeagoodsolutiontothisproblem.Youcanusea

single,high-bandwidthconnection(buywhatyouneed)toallow

multiplehomeworkers,travelingsalesmen,andothermobile

workerstoconnecttoyournetworkjustasiftheyweresitting

atadeskattheoffice.

Theonlyproblemwiththisaccessmethodisthefactthatthe

Internetisnotexactlythemostsecureplaceintheworld.Asa

matteroffact,justconnectingyourcompany'snetworktothe



Internetisaserioustaskthatshouldbeaccompaniedbycareful

considerationofhowyouwillcontrolthatconnection(suchas

usingagoodfirewallstrategy),andhowyouwillsegment

portionsofyournetworktomakesurethatintrusionsorother

securitybreachescanbeminimized.



Note

ThischapterusestheInternetastheexampleofa

WANbecauseit'sthemostcommonmethodused

todayforconnectingtoremotesitesinexpensively.

However,VPNtechnologycanbeusedacrossany

sharedorcorporatenetwork.Youstillcanhavea

bankofmodemsandletusersdialupyourlocalRAS

andcreateaconnectionthroughyournetwork.



InatypicalLAN(localareanetwork)setting,computers,

servers,andotherresourcesareconnectedusingswitches(or

hubsinoldernetworksthathavenotyetupgradedtonewer

hardware).RoutersareusedtoconnectLANssothatalogical

addressingschemecanbeused.Theproblemwithsecurityis

thatwhentheIPprotocolisused,forexample,thepayload

sectionoftheIPpacketcarriessomehigher-levelprotocol

messagewithoutanywayofencryptingthedata.Ifyoucan

intercepttheIPpacket,youcaneasilydeterminewhichprotocol

isbeingusedandgettotheinformationveryquickly.

Asyoucanguess,VPNsaremadeupoftwobasiccomponents:

atunnel,whichisavirtualpaththroughaWAN,andsomeform

ofencryptiontorenderthecontentsofthepayload(and

possiblytheheaderinformationoftheupper-levelprotocol)

unusableifintercepted.







Protocols,Protocols,andMoreProtocols!

BecausethefunctionsprovidedbyaVPNincludetunneling,

dataintegrity,andauthentication,itmakessensethataVPNis

notcreatedusingasingleprotocol.Instead,severalprotocols

canbeusedtocreateaVPN,eachperformingaparticular

function.Inthissectionthefollowingprotocolsarebriefly

examined:

InternetProtocolSecurity(IPSec)

Point-to-PointTunnelingProtocol(PPTP)

LayerTwoTunnelingProtocol(L2TP)

Forthemostpart,onlyIPSecshouldbeamajorfactorinVPNs

inthecomingyears.PPTPwasusedbyWindowsNT4.0aspart

ofitsVPNpackage,andL2TPhasreplaceditinWindows2000

andWindowsXPVPNs.L2TPisbasicallyjustthePPTPprotocol

combinedwiththeL2FprotocoldevelopedbyCisco.However,

mostVPNvendorsareusingtheIPSecprotocolsinstead,which

aredescribedingreaterdetailthanPPTPandL2TPinthis

chapter.TheIPSecprotocolsincorporatesomeofthesecurity

mechanismsthatwereoriginallydesignedtobeincludedinIPv6

buthavebeenadaptedforuseintheexistingIPv4network.



Note

BeforeyouadoptaparticularVPNsolution,you

shoulddetermineiftheconnectionwillbeusedby

PDAs,PocketPCs,orsmartphones.Manyofthese

devicesdonotincludeintegratedVPNsupport,but

insomecasesupdatestotheoperatingsystemor

third-partysoftwaredoesprovidethisfunctionality



asanadditionalfeature.IPSecisthemostcommon

VPNprotocolsupportedbyhand-helddevices.



IPSecProtocols

Asnotedpreviously,IPSecistheemergingstandardbeing

adoptedbymoreandmoreVPNvendors.IPSecwasderived

fromconceptsthatwereoriginallydesignedtoprovidefor

securecommunicationsinthenextgenerationoftheIP

protocol,IPv6,whichisgraduallybeingdeveloped.

AlthoughMicrosoftchoosestouseL2TPandIPSecin

combinationasitsVPNsolutionforWindows2000andWindows

XP,manyhardwareandsoftwarevendorsarestickingwitha

simpleIPSecsolution.

Thegoodnewsisthatifyoudecideonanall-IPSecsolution,

youcanbevirtuallyassuredthatequipment(orsoftware)from

onevendortoanotherwillworktogether.IfyouhaveanallWindowsserverenvironment,thismightbeofnoconcern.For

thosewhooperatemultiprotocolnetworks,IPSecmightbethe

bestchoice.Asnotedpreviously,IPSecisalsothemostwidely

supportedVPNprotocolonhandhelddevices.

IPSecisastandarddefinedinseveralRequestforComments

(RFC)documents.IPSecistransparenttotheenduserandcan

traversetheInternetusingstandardIPv4routersandother

equipmentwithoutrequiringanymodificationbecauseit

operatesattheNetworklayer.IPSecisalsoflexible,allowingfor

thenegotiationanduseofmanydifferentencryptionand

authenticationtechniques.

ThethreemaincomponentsofIPSecarethefollowing:

InternetKeyExchange(IKE)Thisistheprotocoldefined

inRFC2048,"InternetSecurityAssociationandKey

ManagementProtocol(ISAKMP),"whichdefinesamethod

forthesecureexchangeoftheinitialencryptionkeys



betweenthetwoendpointsoftheVPNlink.

AuthenticationHeader(AH)Thisprotocol,definedinRFC

1826,"TheAuthenticationHeader,"providesforinsertinga

standardIPv4headerintoanadditionalheaderthatcanbe

usedtoensuretheintegrityoftheheaderinformationand

payloadasthepacketmakesitswaythroughtheInternet.

AHdoesnotencrypttheactualIPpayloaddata,butinstead

providesamechanismtodeterminewhetherthepayloador

headerhasbeentamperedwith.

EncapsulatingSecurityPayload(ESP)Thisprotocol

performstheactualencryptionofthedatacarriedintheIP

packetsothatitcannotbeunderstoodbyanyonewho

mightinterceptyourdatastream.



InternetKeyExchange(IKE)

IKEdefinesthemechanismusedbytheendpointsoftheVPNto

establishasecureconnectionandexchangeencryptionkeys

andotherinformationpertinenttoasecureconnection.IKE

usespublic-keytechniquesthatwerediscussedinthepreceding

chapter.Ifyourecall,thepublickeyhalfofakeypaircanbe

knownbyanyone,aslongastheprivate-keyhalfofthekey

pairremainsasecret.Thus,eachendoftheconnectioncanuse

theotherend'spublickeytoencryptdata,whichcanthenbe

readonlybytheotherendoftheconnectionthatholdsthe

privatekeythatcanunlockthedata.

IKEprovidesfortheestablishmentofasecurityassociation

(SA),whichisthesetofdatathatgovernstheparticular

connection.SAsareunidirectional;thatis,eachsidenegotiates

anSAwiththeoppositeendofthelink.Thinkofitasacontact

betweentheendpoints.TheitemsthatarenegotiatedbyIKE

foranSAincludethese:



TheencryptionalgorithmtobeusedonthelinkThis

canbeDES(DataEncryptionStandard),triple-DES,andso

on.

ThehashalgorithmMessageDigest5(MD5)orSecure

HashAlgorithm(SHA)isusedtoensuretheintegrityofdata

transferred.

AnauthenticationmethodNotsurprisingly,thisisthe

methodthatwillbeusedforauthentication.

ADiffie-HellmangroupDiffie-Hellmantakesitsname

fromtheinventorsofpublic-keycryptography.ADiffieHellmangroupisbasicallyaspecificationinwhicheach

groupdefinesthelengthofthebaseprimenumbersthat

areusedforthekeyexchange.Group1isconsideredtobe

easiertobreakthanGroup2,andsoon.Bothsidesofthe

exchangemustusethesameDiffie-Hellmangroup,of

course.

EncryptionisdetailedinChapter47,"EncryptionTechnology."



Diffie-Hellmanusesapublicandprivatekeytoformapairof

keys.Thepublickeyisusedtoencryptdata,whereasthe

private(secret)keyofthepairisusedbythereceiverto

decryptthedata.Anyonecandiscoverthepublickeybecauseit

canbeusedonlytoencryptdata,andnottoperformthe

reverseprocess.

Usingthisprocess,amastersecretkeyisexchangedsothat

furtherencryptioncanusesymmetricencryption,whichismuch

fasterthanpublic-keyencryption,toprotectdataonthelink.



Afterbothsideshaveauthenticatedthemselvestotheother

side,negotiationstakeplacetodeterminewhetherAHorESP

willbeused,whathashingalgorithmwillbeused,andwhat

encryptionalgorithmwillbeused(ifESPisused).

Theactualmechanicsofthisexchangearealittlemore

complicated.TheOakleyprotocol(definedinRFC2412)isused

byIKEtodefinesuchthingsastheprimenumbergroupsthat

areusedforthepublic-keygeneration,andtodecidewhether

certificate-basedauthenticationwillbeused.Asecurity

parametersindex(SPI)valueisused,alongwithanIPaddress

andthesecurityprotocol,touniquelyidentifyaspecificSA.

UsingIKE,thevaluefortheSPIisapseudorandomlygenerated

number.



TheAuthenticationHeader(AH)

IPSecconsistsofthetwobasicAHandESPprotocolsthatare

usedafterIKEhasestablishedanSA.AHprovidesamechanism

toensuretheintegrityoftheIPheaderandthepayloadofthe

IPpacketthatwillbetransportedacrossanuntrustedlink,such

astheInternet.Whenusedbyitself,AHcannotprovideatotal

guaranteeoftheentireIPheaderbecausesomeofthefieldsin

theIPheaderarechangedbyroutersasthepacketpasses

throughthenetwork.



FormoreinformationaboutfieldsthatmakeupanIPheader,see

Chapter24,"OverviewoftheTCP/IPProtocolSuite."



TheAHisinserteddirectlyaftertheIPheaderinanIPv4packet

andiscomposedofseveralimportantfields:



NextHeaderThis8-bitfieldisusedtoidentifytheprotocol

thatfollowstheheader.IfonlyAHisbeingusedwithout

ESP,typicallythisfieldcontainstheprotocolnumberforTCP

becauseTCPisthestandardpackettypeusedtocarrymost

Internettraffic.

LengthThis8-bitfieldisusedtospecifythetotallengthof

theAH,andrepresentsthenumberof32-bitwordsthat

makeuptheAH.

ReservedThisfieldisnotusedatthistime,butshould

insteadbezero-filledaccordingtothestandard.

SecurityParametersIndex(SPI)This32-bitfield

containsanumberusedtoidentifytheSA.Avalueof0

indicatesthatnoSAexists,whereasthenumbers1255are

reservedbytheIANA(InternetAssignedNumbers

Authority).

SequenceNumberThis32-bitfieldisusedasacounterto

keeptrackofpacketsthatbelongtoaparticularSPI.The

counterisincrementedonceforeachpacketsent.Thisis

usefulforpreventingaman-in-the-middlesortofattack.

AuthenticationDataThisisavariable-lengthfieldthat

containsdatausedforauthenticationpurposes,suchasa

digitalcertificate.Ifthisfielddoesnotendona32-bit

boundary,it'spaddedtoadjustitslength.

Asmentionedearlier,theAHisusedtoprovideanintegrity

checktodeterminewhethertheactualheaderorpayloadhas

beentamperedwithduringtransit.Itdoesthisbyusinga

hashingalgorithmtoprovideadigitalsignatureforthepacket.

AHdoesnotencryptthepayloaddata.Ifapacketisreceived

andtheAHindicatesthatthepackethasbeentamperedwith,



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 46. Virtual Private Networks (VPNs) and Tunneling

Tải bản đầy đủ ngay(0 tr)

×