Imam slijedecu situaciju Na dvije udaljene lokacije postavljena dva DD-WRT routera (na PC Enginesu Alix) jedan podesen kao PPTP server, a drugi kao PPTP client Na internet spojini sa ADSL modemima od istog ISP provajdera. Moj problem je slijedeći. Svak put kada se promjeni IP adresa od ISP veza mi VPn veza mi pukne i kreirami se ponovo, ali sada mogu samu pingati router, a i ne računara iza routera.Cini mi se da se IP adresa na WAN portovima od ISP-a promjeni istovremeno pošto provjader to salje sa istog servera izgleda. Routere sam podesio prema uputstvo dolje navedenom. kako riješiti problem.
This is a guide for creating a point to point VPN using the PPTP client and server, for people unable / bored etc... using the OpenVPN Client
I've made this small code because DD-WRT does not allow you to save a route running on a VPN tunnel on PPTP (or at least i haven't found another way), so there is no route going back from the server network to the client network.
Basically, the guide in the Wiki is fine for creating a VPN using the PPTP server and client parts of DD-WRT. I will not repeat those instructions, since they are fine. Just follow them to setup a PPTP VPN for the following locations. However, with this example only 1 site needs a PPTP server and the other PPTP client.
So, lets say we have 2 locations , LocationA and LocationB
Net details are as follows:
LocationA
Network: 192.168.1.0/24
Router IP: 192.168.1.254
LocationB
Network: 192.168.2.0/24
Router IP: 192.168.2.254
You setup the PPTP Server on LocationA and the PPTP Client on LocationB
However, while all pc's on B will be able to access any pc on A, the other is not possible (yet), because there isn't a route from A to go back to B.
To do this, log on the CLI of DD-WRT, and type the following command:
Code:
nvram set routes='route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.254'nvram commit
This saves the variable "routes" with a route-add entry
However, we still need to apply this route AFTER the VPN Tunnel is up. To do this, we do the following:
(Again to save)
Code:
nvram set rc_startup='nvram get routes > /tmp/routescat /tmp/pptpd/ip-up /tmp/routes > /tmp/pptpd/ip-tempmv /tmp/pptpd/ip-temp /tmp/pptpd/ip-upchmod 700 /tmp/pptpd/ip-up'nvram commit
This basically runs on every startup, saves the route from the nvram variable to a file, and then adds that line to the last line of the ip-up script that runs when the PPTP server establishes the connection.