PPTP Tunneling

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:22, 31 December 2008 (edit)
Jbrazio (Talk | contribs)

← Previous diff
Current revision (00:01, 23 October 2011) (edit) (undo)
Gnassar (Talk | contribs)
(Tested Versions)
 
(7 intermediate revisions not shown.)
Line 5: Line 5:
== Notes == == Notes ==
-* If your ISP do not provide you a fixed IP address, you should no create a dynamic DNS account from any DD-WRT supported provider. I'll use No-IP.com account in the examples.+* If your ISP do not provide you a fixed IP address, you should now create a dynamic DNS account from any DD-WRT supported provider. I'll use a No-IP.com account in the article's examples.
* I assume you've got your WAN already up, if you need a different setup please feel free to change whatever you need. * I assume you've got your WAN already up, if you need a different setup please feel free to change whatever you need.
 +
 +== Tested Versions ==
 +This article should work with any supported DD-WRT version. Feel free to add your version to the following list:
 +* DD-WRT v24-sp2 (01/21/09) std
 +
 +Does NOT work with
 +* DD-WRT v24-sp2 (10/10/09) std-nokaid (instructions below are not for v24-sp2 firmware; may work (untested) with method from http://www.dd-wrt.com/phpBB2/viewtopic.php?p=10933#10933)
= Configuration = = Configuration =
Line 47: Line 54:
Now we tell the router that there is another network on the other side of the WAN. Now we tell the router that there is another network on the other side of the WAN.
Basically we're telling "If you want to access any host on the 192.168.2.x subnet please forward your packet trough the router at the IP address "192.168.2.1". Basically we're telling "If you want to access any host on the 192.168.2.x subnet please forward your packet trough the router at the IP address "192.168.2.1".
-# Goto Administration > Advanced Routing+# Goto Setup > Advanced Routing
 +# Under Static Routing:
# Set Route Name to "foo-corp-dd-wrt-02" # Set Route Name to "foo-corp-dd-wrt-02"
# Set Metric to "0" # Set Metric to "0"
Line 54: Line 62:
# Set Gateway to "192.168.2.1" # Set Gateway to "192.168.2.1"
# Set Interface to "ANY" # Set Interface to "ANY"
-# '''Save''' 
- 
- 
-Once uppon a time someone told that "Loopback" should be disabled, can't find a reason for it.. so I think this should be the way to go. 
-# Goto Administration > Management 
-# Enable "Loopback" 
-# Enable "Routing" 
-# Set Maximum Ports: 4096  
-# Set TCP Timeout: 3600 
-# Set UDP Timeout: 120 
# '''Save''' # '''Save'''
Line 69: Line 67:
This router will have the role of "concentrator" meaning that every router that wants to be part of our bridge should connect to it. This router will have the role of "concentrator" meaning that every router that wants to be part of our bridge should connect to it.
If you've got a more complex design with three routers (A, B and C) traffic from B to C will always pass trough router A. If you've got a more complex design with three routers (A, B and C) traffic from B to C will always pass trough router A.
-# Goto Services > VPN+# Goto Services > PPTP
# Enable PPTP Server # Enable PPTP Server
-# Enable Broadcast Support 
# Set Server IP to "192.168.1.1" # Set Server IP to "192.168.1.1"
# Set Client IP(s) to "192.168.1.200-201" # Set Client IP(s) to "192.168.1.200-201"
# Set CHAP-Secrets to: "<PPTP_CLIENT_USERNAME_SITE02> * <PPTP_CLIENT_PASSWORD_SITE02> *" # Set CHAP-Secrets to: "<PPTP_CLIENT_USERNAME_SITE02> * <PPTP_CLIENT_PASSWORD_SITE02> *"
-# Disable Radius 
# Disable PPTP Client Options # Disable PPTP Client Options
# '''Save''' # '''Save'''
Line 81: Line 77:
Saving ourselves from a headache.. ;-) Saving ourselves from a headache.. ;-)
-# Goto Security > VPN Passthrough+# Goto Security > VPN
# Enable PPTP Passthrough # Enable PPTP Passthrough
# Disable IPSec and L2TP Passthrough # Disable IPSec and L2TP Passthrough
Line 98: Line 94:
# Goto Administration # Goto Administration
# '''Reboot Router''' # '''Reboot Router'''
- 
== dd-wrt-02 == == dd-wrt-02 ==
Line 117: Line 112:
Now we tell the router that there is another network on the other side of the WAN. Now we tell the router that there is another network on the other side of the WAN.
Basically we're telling "If you want to access any host on the 192.168.1.x subnet please forward your packet trough the router at the IP address "192.168.1.1". Basically we're telling "If you want to access any host on the 192.168.1.x subnet please forward your packet trough the router at the IP address "192.168.1.1".
-# Goto Administration > Advanced Routing+# Goto Setup > Advanced Routing
# Set Route Name to "foo-corp-dd-wrt-01" # Set Route Name to "foo-corp-dd-wrt-01"
# Set Metric to "0" # Set Metric to "0"
Line 124: Line 119:
# Set Gateway to "192.168.1.1" # Set Gateway to "192.168.1.1"
# Set Interface to "ANY" # Set Interface to "ANY"
-# '''Save''' 
- 
- 
-# Goto Administration > Management 
-# Enable "Loopback" 
-# Enable "Routing" 
-# Set Maximum Ports: 4096  
-# Set TCP Timeout: 3600 
-# Set UDP Timeout: 120 
# '''Save''' # '''Save'''
This router will have the role of "node". This router will have the role of "node".
-# Goto Services > VPN+# Goto Services > PPTP
# Disable PPTP Server # Disable PPTP Server
# Enable PPTP Client Options # Enable PPTP Client Options
Line 152: Line 138:
-# Goto Security > VPN Passthrough+# Goto Security > VPN
# Enable PPTP Passthrough # Enable PPTP Passthrough
# Disable IPSec and L2TP Passthrough # Disable IPSec and L2TP Passthrough
Line 161: Line 147:
# Goto Administration # Goto Administration
# '''Reboot Router''' # '''Reboot Router'''
- 
== Notes == == Notes ==
Line 168: Line 153:
* In the example the IP range used for VPN clients were "192.168.1.200-201" thus 2 VPN clients are allowed to connect to our concentrator. You should increase this if more routers will be bridged. * In the example the IP range used for VPN clients were "192.168.1.200-201" thus 2 VPN clients are allowed to connect to our concentrator. You should increase this if more routers will be bridged.
 +== Issues ==
 +* Not sure why "NAT" is enabled, given the sites are a site to site route - NAT will break the whole premise of a site to site connection
= See Also = = See Also =
Line 174: Line 161:
-[[Category:English documentation]]+[[Category:Tunneling]]
[[Category:Advanced tutorials]] [[Category:Advanced tutorials]]

Current revision

Contents

[edit] Introduction

This setup will bridge DD-WRT routers, allowing any host connected to the network to be visible from the WAN cloud. To turn this HOWTO simple I'll use only two DD-WRT routers but theoretically you can further extend the setup to any number of routers.


[edit] Notes

  • If your ISP do not provide you a fixed IP address, you should now create a dynamic DNS account from any DD-WRT supported provider. I'll use a No-IP.com account in the article's examples.
  • I assume you've got your WAN already up, if you need a different setup please feel free to change whatever you need.


[edit] Tested Versions

This article should work with any supported DD-WRT version. Feel free to add your version to the following list:

  • DD-WRT v24-sp2 (01/21/09) std

Does NOT work with

[edit] Configuration

[edit] Generic information

  • dd-wrt-01
    • Address: 192.168.1.1
    • Netmask: 255.255.255.0
    • Gateway: 0.0.0.0
    • DHCP Range: 192.168.1.100-150
    • DDNS: foo-corp-dd-wrt-01.no-ip.com


  • dd-wrt-02
    • Address: 192.168.2.1
    • Netmask: 255.255.255.0
    • Gateway: 0.0.0.0
    • DHCP Range: 192.168.2.100-150
    • DDNS: foo-corp-dd-wrt-02.no-ip.com


[edit] dd-wrt-01

This step will configure the basic information for the local network.

  1. Goto Setup > Basic Setup
  2. Set Router Name and Host Name to "dd-wrt-01"
  3. Set Local IP Address to "192.168.1.1"
  4. Set Subnet Mask to "255.255.255.0"
  5. Save


Now lets make your dynamic IP address always reachable trough a hostname.

  1. Goto Administration > DDNS
  2. Set DNS Service to "No-IP.com"
  3. Change Username, Password and Hostname to your personal account information
  4. Hostname in this example will be set to "foo-corp-dd-wrt-01.no-ip.com"
  5. Save


Now we tell the router that there is another network on the other side of the WAN. Basically we're telling "If you want to access any host on the 192.168.2.x subnet please forward your packet trough the router at the IP address "192.168.2.1".

  1. Goto Setup > Advanced Routing
  2. Under Static Routing:
  3. Set Route Name to "foo-corp-dd-wrt-02"
  4. Set Metric to "0"
  5. Set Destination LAN NET to "192.168.2.0"
  6. Set Subnet Mask to "255.255.255.0"
  7. Set Gateway to "192.168.2.1"
  8. Set Interface to "ANY"
  9. Save


This router will have the role of "concentrator" meaning that every router that wants to be part of our bridge should connect to it. If you've got a more complex design with three routers (A, B and C) traffic from B to C will always pass trough router A.

  1. Goto Services > PPTP
  2. Enable PPTP Server
  3. Set Server IP to "192.168.1.1"
  4. Set Client IP(s) to "192.168.1.200-201"
  5. Set CHAP-Secrets to: "<PPTP_CLIENT_USERNAME_SITE02> * <PPTP_CLIENT_PASSWORD_SITE02> *"
  6. Disable PPTP Client Options
  7. Save


Saving ourselves from a headache.. ;-)

  1. Goto Security > VPN
  2. Enable PPTP Passthrough
  3. Disable IPSec and L2TP Passthrough
  4. Save


This step maybe optional.. but routing packets trough a WAN interface without being encrypted is stupid.

  1. Goto Administration > Commands
  2. Enter "sed -i -e 's/mppe .*/mppe required,stateless/' /tmp/pptpd/options.pptpd"
  3. Save Startup
  4. NOTE: This will force all PPTP clients to use encryption
  5. Save


Wrapping everything up..

  1. Goto Administration
  2. Reboot Router

[edit] dd-wrt-02

  1. Goto Setup > Basic Setup
  2. Set Router Name and Host Name to "dd-wrt-02"
  3. Set Local IP Address to "192.168.2.1"
  4. Set Subnet Mask to "255.255.255.0"
  5. Save


  1. Goto Administration > DDNS
  2. Set DNS Service to "No-IP.com"
  3. Change Username, Password and Hostname to your personal account information
  4. Hostname in this example will be set to "foo-corp-dd-wrt-02.no-ip.com"
  5. Save


Now we tell the router that there is another network on the other side of the WAN. Basically we're telling "If you want to access any host on the 192.168.1.x subnet please forward your packet trough the router at the IP address "192.168.1.1".

  1. Goto Setup > Advanced Routing
  2. Set Route Name to "foo-corp-dd-wrt-01"
  3. Set Metric to "0"
  4. Set Destination LAN NET to "192.168.1.0"
  5. Set Subnet Mask to "255.255.255.0"
  6. Set Gateway to "192.168.1.1"
  7. Set Interface to "ANY"
  8. Save


This router will have the role of "node".

  1. Goto Services > PPTP
  2. Disable PPTP Server
  3. Enable PPTP Client Options
  4. Set Server IP or DNS Name to "foo-corp-dd-wrt-01.no-ip.com"
  5. Set Remote Subnet to "192.168.1.0"
  6. Set Remote Subnet Mask to "255.255.255.0"
  7. Set MPPE Encryption to "mppe required"
  8. Set MTU to "1450"
  9. Set MRU to "1450"
  10. Enable NAT
  11. Set Username to "PPTP_CLIENT_USERNAME_SITE02"
  12. Set Password to "PPTP_CLIENT_PASSWORD_SITE02"
  13. Save


  1. Goto Security > VPN
  2. Enable PPTP Passthrough
  3. Disable IPSec and L2TP Passthrough
  4. Save


Wrapping everything up..

  1. Goto Administration
  2. Reboot Router

[edit] Notes

  • The router's subnets should not intersect each other (i.e. 192.168.<XXX>.1).
  • The IP address pool for VPN clients must be outside the range of DHCP clients.
  • In the example the IP range used for VPN clients were "192.168.1.200-201" thus 2 VPN clients are allowed to connect to our concentrator. You should increase this if more routers will be bridged.

[edit] Issues

  • Not sure why "NAT" is enabled, given the sites are a site to site route - NAT will break the whole premise of a site to site connection

[edit] See Also

PPTP_Server_Configuration
HOW_TO_configure_a_WINDOWS_BOX_to_make_a_VPN_Connection_to_linksys