25
Virtual Private Networking Irfan Khan Myo Thein Nick Merante

Virtual Private Networking

  • Upload
    opal

  • View
    40

  • Download
    0

Embed Size (px)

DESCRIPTION

Virtual Private Networking. Irfan Khan Myo Thein Nick Merante. VPN + IPSec. VPN: Virtual Private Network Enable two remote networks to appear as one network via the internet. IPSec: Internet Protocol Security Extensions Enable machines to securely communicate over an insecure medium. - PowerPoint PPT Presentation

Citation preview

Page 1: Virtual Private Networking

Virtual Private Networking

Irfan Khan

Myo Thein

Nick Merante

Page 2: Virtual Private Networking

VPN + IPSec

• VPN: Virtual Private Network– Enable two remote networks to appear as one

network via the internet.

• IPSec: Internet Protocol Security Extensions– Enable machines to securely communicate over

an insecure medium

Page 3: Virtual Private Networking

What We Will Cover

• The need for security

• Benefits of a VPN/IPSec combination

• The necessary tools

• How to set everything up

• How to verify everything is working

Page 4: Virtual Private Networking

The Need for Security

• Internet not like it used to be

• The hunt for bugs

• Automated tools do most of the dirty work

• Systems targets regardless of content value

• Business need for securing client/customer data in global network

Page 5: Virtual Private Networking

Why Use VPN

• Confidentiality

• Integrity

• Authenticity

• Replay Protection

Page 6: Virtual Private Networking

Who can benefit

• Peer to peer security – encryption of traffic between people.– PGP Desktop Security www.pgpi.org

• Corporate security – encryption of traffic between offices.

Page 7: Virtual Private Networking

Benefits to personal users

• Create a secure path between two machines

• Enhance the level of trust with authentication

Page 8: Virtual Private Networking

Benefits for corporate users

• Can do away with leased lines connecting offices without sacrificing privacy.

• Can then make use of the internet:– More reliable– More portable– More cost-effective

Page 9: Virtual Private Networking

A method of security

• Implementing a Virtual Private Network (VPN)

• Using IPSec to encrypt all traffic

• Authenticating data sent

Page 10: Virtual Private Networking

What is IPSec

IPSec = AH + ESP + IKE

Page 11: Virtual Private Networking

Different ModesAH vs ESP

• AH: Authentication Header– Attaches checksum to packets– Ensures packet not modified in transit

• ESP: Encapsulating Security Payload– Encrypts data– Ensures authentication

Page 12: Virtual Private Networking

• Tunnel Mode– Encapsulate packet into new IPv4/v6 header– Used for VPN Gateways

• Transport Mode– Encrypts normal traffic between peers

Different ModesTunnel vs Transport

Page 13: Virtual Private Networking

Tunnel vs Transport

Host 1 Host 2

Host 1 Gateway 1 Host 2

Transport Mode

Tunnel Mode

Gateway 2

Page 14: Virtual Private Networking

Necessary Tools

• Two unix machines with properly configured kernels to serve as gateways

• Racoon for key exchange

• Internet connection

Page 15: Virtual Private Networking

Preparing the machine

•Modify the kernelbpf # Berkeley packet filter

IPFIREWALL # Enable Firewall

IPDIVERT # Divert IP sockets (Used for NAT)

IPSEC # IP security

IPSEC_ESP # IP security (crypto; define w/ IPSEC)

IPSEC_DEBUG # debug for IP sec

•Install Racoon– Obtain source code or install from ports collection

Page 16: Virtual Private Networking

Creating the tunnel

• Set up tunnel between 2 private networks

• gif – Generic tunnel interface

• Diagram A

• Tunnel Script (Step 3)

Page 17: Virtual Private Networking

Diagram A

InternetInternetGatewayA

NodeB

NodeA

NodeC

GatewayB

NodeB

NodeA

NodeC

VPN Tunnelvan-gw1

gif0: 192.168.6.1

vpn-gw2gif0: 192.168.5.1

192.52.220.22 192.52.220.152

192.168.6.100 192.168.6.101 192.168.6.102 192.168.5.100 192.168.5.101 192.168.5.102

Page 18: Virtual Private Networking

Adding the Encryption

• Creating the policies

• Manual keying

• Automatic keying (racoon)– Racoon configuration

• Different algorithms– des, 3des, blowfish, etc.

• Step 4 / Figure A

Page 19: Virtual Private Networking

Figure A# Ident: ipsec.conf# Usage: setkey –f ipsec.conf

flush; # Flush the Security Association Database spdflush; # Flush the Security Policy Database

#add 192.52.220.22 192.52.220.152 esp 9111 -E blowfish-cbc "12345";#add 192.52.220.152 192.52.220.22 esp 9112 -E blowfish-cbc "12345";

spdadd 192.168.6.0/24 192.168.5.0/24 any -P out ipsec esp/tunnel/192.52.220.22-192.52.220.152/require;spdadd 192.168.5.0/24 192.168.6.0/24 any -P in ipsec esp/tunnel/192.52.220.152-192.52.220.22/default;

Page 20: Virtual Private Networking

Changes to the Packet

Orig IP hdr TCP Data

Orig IP hdr TCP DataESP

TrailerESP Auth

ESP Header

encrypted

authenticated

Before applying ESP

After applying ESP

IP v4:

ESP: Encapsulating Security Payload

Page 21: Virtual Private Networking

Manual vs Automatic Keying

• Benefits of manual keying– Simplicity– Less overhead

• Benefits of automatic keying– Much more secure – Encryption keys periodically changed based on

time or amount transferred.

Page 22: Virtual Private Networking

Encryption Algorithms

• Data Encryption Standard (DES)– 64 bits

• Triple DES– 192 bits

• Blowfish– 40 to 448 bits

• Rijndael (AES)– 128/192/256 bits

Page 23: Virtual Private Networking

Verification

• An analysis before and after– Key Policies (Figure B)– Dump Security Association Database with

setkey –D (Figure C)– TCP Dump of Headers (Figure D)– TCP Dump of Data (Figure E)

Page 24: Virtual Private Networking

Diagram A

InternetInternetGatewayA

NodeB

NodeA

NodeC

GatewayB

NodeB

NodeA

NodeC

VPN Tunnelvan-gw1

gif0: 192.168.6.1

vpn-gw2gif0: 192.168.5.1

192.52.220.22 192.52.220.152

192.168.6.100 192.168.6.101 192.168.6.102 192.168.5.100 192.168.5.101 192.168.5.102

Page 25: Virtual Private Networking

Conclusion

Different tools for different jobs

• PGP for encrypting data

• SSL for encrypting sockets

• SSH for encrypting logons

• IPSec for encrypting all traffic

Another tool for the administrator’s toolbox