SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
OpenSalon
Conference 2




                    A VPN System
               with User Authentication
                and Bandwidth Control


                                     董淑照
                                Dong Shuzhao
                   Harbin Institute of Technology at Weihai
                          dongshuzhao@gmail.com

                                Oct. 9, 2010
Introduction to VPN
What is VPN?
What is VPN?

                  A virtual private
                   network (VPN) is a
                   computer network
                   that uses a public
                   telecommunication
                   infrastructure such as
                   the Internet to provide
                   remote offices or
                   individual users with
                   secure access to their
                   organization's
                   network.
What is VPN?

   An IP tunnel between hosts or routers to extend
    the reach of a subnet.
       The tunnel may be encrypted.
       Tunnel creation may need authentication process.
       Traffic may be subject to accounting, logging and
        firewalling.
Use of VPN

   Remote intranet access
       For companies, schools
   Data encryption
       Public networks, Wi-fi
   Access control within intranet
       Network authentication
VPN Solutions

   PPTP
       Point-to-Point Tunneling Protocol
       Security vulnerabilities
   L2TP
       Layer 2 Tunneling Protocol
       Improvement of PPTP
   SSL VPN
       OpenVPN
       Totally application layer protocol
Principles of GFW
Principles of GFW

   IP Block
   DNS Tampering
   DNS Pollution
   Content Filtering
   ...
IP Block




           twitter.com 128.242.240.20
IP Block

   Weakness
       Change of IP address
       Dynamic IP
   Solution
       Change a secure DNS server
       Modify 'hosts' file
DNS Tampering
DNS Tampering

   Weakness
       Only control of DNS servers in Chinese mainland
   Solution
       Change to a foreign DNS server
DNS Pollution
DNS Pollution
DNS Pollution

   Weakness
       ?
   Solution
       ?
Content Filtering
Content Filtering

   Weakness
       ?
   Solution
       ?
VPN & GFW
VPN & GFW
VPN with Routing Table
VPN with Routing Table

   chnroutes
       http://code.google.com/p/chnroutes/
   Distinguishing lines
       Chinese (mainland) IPs: original route
       Foreign Ips: via VPN
Implementation of
   VPN System
System Overview
Distributed Structure
Database Schema
User Authentication

   saslauthd
       pam-mysql
       /etc/pam.d/openvpn
       DB Fields: username, password, active
   OpenVPN
       PAM plugin
   PPTP VPN
       pppd-sql
       http://freshmeat.net/projects/pppd-sql
Logging

   Script hook
       connect.sh
                  Create a new record with begin time, ip, port, etc.
       disconnect.sh
                  Fill back previous record with end time,
                    bandwidth usage, etc.
Bandwidth Control

   disconnect.sh
       Check log and set active to 0 if bandwidth limit
        exceeded
       Lock expired users
   cron
       /etc/cron.hourly/openvpn
       Unlock users whose bandwidth roll back
       Lock expired users
VPN Control Panel

   PHP
   jQuery
       flexigrid
Mailing System

   DNS MX Record
   Sendmail (or Exim, Qmail...)

   Sending in Shell
       login alerts, bandwidth alerts, expiration alerts
   Sending in PHP
       password alerts, invitations, password reset
       mail() function in PHP
Further Improvements

   P2P Prevention
       Kernel modules
   Real-time User Management
       Killing an online user
       Disconnect immediately after bandwidth run out
   Billing System
       Paypal Interface
       Alipay Interface
THE END

Contenu connexe

Tendances

Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniquesinbroker
 
Virtual private network(vpn)
Virtual private network(vpn)Virtual private network(vpn)
Virtual private network(vpn)sonalikasingh15
 
Virtual Private Network (VPN)
Virtual Private Network (VPN)Virtual Private Network (VPN)
Virtual Private Network (VPN)Devolutions
 
Virtual Private Network main
Virtual Private Network mainVirtual Private Network main
Virtual Private Network mainKanika Gupta
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Networkashishrocks23
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkOsp Dev
 
Virtual Private Network- VPN
Virtual Private Network- VPNVirtual Private Network- VPN
Virtual Private Network- VPNNikhil Kumar
 
Vpn Virtual Private Network
Vpn  Virtual Private NetworkVpn  Virtual Private Network
Vpn Virtual Private Networkfaisalmalik
 
Curso: Redes y comunicaciones básicas: 03 VPN
Curso: Redes y comunicaciones básicas: 03 VPNCurso: Redes y comunicaciones básicas: 03 VPN
Curso: Redes y comunicaciones básicas: 03 VPNJack Daniel Cáceres Meza
 
VPN (virtual Private Network)
VPN (virtual Private Network)VPN (virtual Private Network)
VPN (virtual Private Network)Chandan Jha
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkRicha Singh
 
Vpn(virtual private network)
Vpn(virtual private network)Vpn(virtual private network)
Vpn(virtual private network)sonangrai
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkHASHIR RAZA
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network) Netwax Lab
 
Design of a Virtual Private Network
Design of a Virtual Private NetworkDesign of a Virtual Private Network
Design of a Virtual Private NetworkShubhayu Roy
 

Tendances (20)

Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniques
 
Virtual private network(vpn)
Virtual private network(vpn)Virtual private network(vpn)
Virtual private network(vpn)
 
Virtual Private Network (VPN)
Virtual Private Network (VPN)Virtual Private Network (VPN)
Virtual Private Network (VPN)
 
Virtual Private Network main
Virtual Private Network mainVirtual Private Network main
Virtual Private Network main
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
Vpn networks kami
Vpn networks kamiVpn networks kami
Vpn networks kami
 
Virtual Private Network- VPN
Virtual Private Network- VPNVirtual Private Network- VPN
Virtual Private Network- VPN
 
Vpn security
Vpn security Vpn security
Vpn security
 
Vpn
Vpn Vpn
Vpn
 
Vpn Virtual Private Network
Vpn  Virtual Private NetworkVpn  Virtual Private Network
Vpn Virtual Private Network
 
Curso: Redes y comunicaciones básicas: 03 VPN
Curso: Redes y comunicaciones básicas: 03 VPNCurso: Redes y comunicaciones básicas: 03 VPN
Curso: Redes y comunicaciones básicas: 03 VPN
 
VPN (virtual Private Network)
VPN (virtual Private Network)VPN (virtual Private Network)
VPN (virtual Private Network)
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
Vpn(virtual private network)
Vpn(virtual private network)Vpn(virtual private network)
Vpn(virtual private network)
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
Vp npresentation 2
Vp npresentation 2Vp npresentation 2
Vp npresentation 2
 
VPN Network
VPN NetworkVPN Network
VPN Network
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network)
 
Design of a Virtual Private Network
Design of a Virtual Private NetworkDesign of a Virtual Private Network
Design of a Virtual Private Network
 

Similaire à Vpn intro by dongshuzhao (20)

4 vpn s
4 vpn s4 vpn s
4 vpn s
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
WLAN:VPN Security
WLAN:VPN SecurityWLAN:VPN Security
WLAN:VPN Security
 
csevpnppt-170905123948 (1).pdf
csevpnppt-170905123948 (1).pdfcsevpnppt-170905123948 (1).pdf
csevpnppt-170905123948 (1).pdf
 
Virtual Private Networks (VPN) ppt
Virtual Private Networks (VPN) pptVirtual Private Networks (VPN) ppt
Virtual Private Networks (VPN) ppt
 
Insights of vpn
Insights of vpnInsights of vpn
Insights of vpn
 
Vpn
VpnVpn
Vpn
 
Vpn_NJ ppt
Vpn_NJ pptVpn_NJ ppt
Vpn_NJ ppt
 
Acit Mumbai - understanding vpns
Acit Mumbai - understanding vpnsAcit Mumbai - understanding vpns
Acit Mumbai - understanding vpns
 
12 Understanding V P Ns
12  Understanding  V P Ns12  Understanding  V P Ns
12 Understanding V P Ns
 
Vpnppt1884
Vpnppt1884Vpnppt1884
Vpnppt1884
 
Vp npresentation
Vp npresentationVp npresentation
Vp npresentation
 
Vpn
VpnVpn
Vpn
 
Vpn presentation
Vpn presentationVpn presentation
Vpn presentation
 
VPN
VPN VPN
VPN
 
Vp npresentation (1)
Vp npresentation (1)Vp npresentation (1)
Vp npresentation (1)
 
V P N
V P NV P N
V P N
 
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALAVIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
 
What Technology Lies Behind VPN
What Technology Lies Behind VPNWhat Technology Lies Behind VPN
What Technology Lies Behind VPN
 
Remote access connection
Remote access connection Remote access connection
Remote access connection
 

Plus de fantasy zheng

The true story_of_hello_world
The true story_of_hello_worldThe true story_of_hello_world
The true story_of_hello_worldfantasy zheng
 
开源沙龙第一期 Python intro
开源沙龙第一期 Python intro开源沙龙第一期 Python intro
开源沙龙第一期 Python introfantasy zheng
 
开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2fantasy zheng
 
开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2fantasy zheng
 
开源沙龙第一期个人知识管理
开源沙龙第一期个人知识管理开源沙龙第一期个人知识管理
开源沙龙第一期个人知识管理fantasy zheng
 

Plus de fantasy zheng (9)

Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Phpsecurity.ppt
Phpsecurity.pptPhpsecurity.ppt
Phpsecurity.ppt
 
F**k Gfw
F**k  GfwF**k  Gfw
F**k Gfw
 
The true story_of_hello_world
The true story_of_hello_worldThe true story_of_hello_world
The true story_of_hello_world
 
开源沙龙第一期 Python intro
开源沙龙第一期 Python intro开源沙龙第一期 Python intro
开源沙龙第一期 Python intro
 
开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2
 
开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2开源沙龙第一期 个人知识管理2
开源沙龙第一期 个人知识管理2
 
开源沙龙第一期个人知识管理
开源沙龙第一期个人知识管理开源沙龙第一期个人知识管理
开源沙龙第一期个人知识管理
 
软件工程2010
软件工程2010软件工程2010
软件工程2010
 

Vpn intro by dongshuzhao

  • 1. OpenSalon Conference 2 A VPN System with User Authentication and Bandwidth Control 董淑照 Dong Shuzhao Harbin Institute of Technology at Weihai dongshuzhao@gmail.com Oct. 9, 2010
  • 4. What is VPN?  A virtual private network (VPN) is a computer network that uses a public telecommunication infrastructure such as the Internet to provide remote offices or individual users with secure access to their organization's network.
  • 5. What is VPN?  An IP tunnel between hosts or routers to extend the reach of a subnet.  The tunnel may be encrypted.  Tunnel creation may need authentication process.  Traffic may be subject to accounting, logging and firewalling.
  • 6. Use of VPN  Remote intranet access  For companies, schools  Data encryption  Public networks, Wi-fi  Access control within intranet  Network authentication
  • 7. VPN Solutions  PPTP  Point-to-Point Tunneling Protocol  Security vulnerabilities  L2TP  Layer 2 Tunneling Protocol  Improvement of PPTP  SSL VPN  OpenVPN  Totally application layer protocol
  • 9. Principles of GFW  IP Block  DNS Tampering  DNS Pollution  Content Filtering  ...
  • 10. IP Block twitter.com 128.242.240.20
  • 11. IP Block  Weakness  Change of IP address  Dynamic IP  Solution  Change a secure DNS server  Modify 'hosts' file
  • 13. DNS Tampering  Weakness  Only control of DNS servers in Chinese mainland  Solution  Change to a foreign DNS server
  • 16. DNS Pollution  Weakness  ?  Solution  ?
  • 18. Content Filtering  Weakness  ?  Solution  ?
  • 22. VPN with Routing Table  chnroutes  http://code.google.com/p/chnroutes/  Distinguishing lines  Chinese (mainland) IPs: original route  Foreign Ips: via VPN
  • 23. Implementation of VPN System
  • 27. User Authentication  saslauthd  pam-mysql  /etc/pam.d/openvpn  DB Fields: username, password, active  OpenVPN  PAM plugin  PPTP VPN  pppd-sql  http://freshmeat.net/projects/pppd-sql
  • 28. Logging  Script hook  connect.sh  Create a new record with begin time, ip, port, etc.  disconnect.sh  Fill back previous record with end time, bandwidth usage, etc.
  • 29. Bandwidth Control  disconnect.sh  Check log and set active to 0 if bandwidth limit exceeded  Lock expired users  cron  /etc/cron.hourly/openvpn  Unlock users whose bandwidth roll back  Lock expired users
  • 30. VPN Control Panel  PHP  jQuery  flexigrid
  • 31. Mailing System  DNS MX Record  Sendmail (or Exim, Qmail...)  Sending in Shell  login alerts, bandwidth alerts, expiration alerts  Sending in PHP  password alerts, invitations, password reset  mail() function in PHP
  • 32. Further Improvements  P2P Prevention  Kernel modules  Real-time User Management  Killing an online user  Disconnect immediately after bandwidth run out  Billing System  Paypal Interface  Alipay Interface