OVH Community, your new community space.

VPN (pptpd) auf Ubuntu


Leo84
27.06.12, 10:24
Hier habe ich mal sehr gutes HowTo geschrieben,
habe es auf einem Isgenug Server mit Ubuntu 12 und Debian 6 mit IPSConfig getestet und es läuft.
http://leos-blog.eu/index.php/pptp-v...er-einrichten/

Mache es genau nach dieser Schritt für Schritt Anleitung und es klappt.

cult
07.06.12, 18:16
Danke Master TH, ich werde das Später mal Testen!

MasterTH
06.06.12, 11:10
Du vergibst die IP des Servers an den VPN-Client?
Das macht keinen Sinn und kann auch die Probleme verursachen.

Nimm einen internen IP-Bereich für deine VPN-Clients und nicht die externe IP-Adresse des Servers.



ppp0 Link encap:Punkt-zu-Punkt-Verbindung
inet Adresse:192.0.0.1 P-z-P:192.0.0.21 Maske:255.255.255.255
UP PUNKTZUPUNKT RUNNING NOARP MULTICAST MTU:1396 Metrik:1
RX packets:44717 errors:0 dropped:0 overruns:0 frame:0
TX packets:41448 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:3
RX bytes:6932045 (6.6 MiB) TX bytes:7408132 (7.0 MiB)



so in der Art muss das aussehen wenn eine connection aufgebaut ist.
Wenn du die externe IP für den VPN-Client vergibst und für den Server selber, dann kann der Server nicht routen, weil die Anfragen auch auf ihn laufen und er die Anfragen versucht anzunehmen, nicht weiß was er damit machen soll und im Endeffekt verwirft er die Anfragen einfach.

cult
05.06.12, 09:14
Hallo,
Danke für die Hilfe.
Aber das ganze steht mit dem Wert 1 da!

Sonst noch eine Idee? Denke das ist ein Routing Problem? Kernel?

Lg
Manuel

spoi
05.06.12, 08:20
was sagt ein:
cat /proc/sys/net/ipv4/ip_forward
??
wenn es 0 sagt, dann ->
echo "1" > /proc/sys/net/ipv4/ip_forward
und setze in der /etc/sysctl.conf
net.ipv4.conf.default.forwarding=1
damit das nach einem reboot erhalten bleibt

cult
04.06.12, 19:26
Hallo,

habe mir auf einen Isgenug 2 mit dem BS ubuntu 11.10 pptpd Installiert.
Das Verbinden via Windows XP und der VPN funktioniert, leider lässt sich weder eine Seite Pingen,Tracen - Surfen.
Das Pingen einer Local IP funktioniert. Kann es am Kernel liegen oder an einem Routing um über die VPN nicht nur Local zu Surfen sondern auch im Netz?

Als Kernel ist der von ovh Installiert "3.2.13-grsec-xxxx-grs-ipv6-64"

Leider sehe ich das Problem nicht, hoffe Ihr könnt mir da etwas helfen?

Hier ein paar Werte:

Ein ipconfig /all von meiner Windows Kiste aus im Connect-VPN Zustand:
Code:
C:\ipconfig /all

Windows-IP-Konfiguration

Hostname. . . . . . . . . . . . . : computer-++++++
Primäres DNS-Suffix . . . . . . . :
Knotentyp . . . . . . . . . . . . : Unbekannt
IP-Routing aktiviert. . . . . . . : Nein
WINS-Proxy aktiviert. . . . . . . : Nein
DNS-Suffixsuchliste . . . . . . . : lan

Ethernetadapter LAN-Verbindung:

Verbindungsspezifisches DNS-Suffix: lan
Beschreibung. . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet
Physikalische Adresse . . . . . . : 00-1+-BB-+4-+A-+7
DHCP aktiviert. . . . . . . . . . : Ja
Autokonfiguration aktiviert . . . : Ja
IP-Adresse. . . . . . . . . . . . : 192.168.1.+++
Subnetzmaske. . . . . . . . . . . : 255.255.255.0
Standardgateway . . . . . . . . . : 192.168.1.+++
DHCP-Server . . . . . . . . . . . : 192.168.1.+++
DNS-Server. . . . . . . . . . . . : 192.168.1.+++
Lease erhalten. . . . . . . . . . : Samstag, 2. Juni 2012 13:51:17
Lease läuft ab. . . . . . . . . . : Sonntag, 3. Juni 2012 13:51:17

PPP-Adapter oiu:

Verbindungsspezifisches DNS-Suffix:
Beschreibung. . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physikalische Adresse . . . . . . : 00-53-45-00-00-00
DHCP aktiviert. . . . . . . . . . : Nein
IP-Adresse. . . . . . . . . . . . : 91.121.++.++
Subnetzmaske. . . . . . . . . . . : 255.255.255.255
Standardgateway . . . . . . . . . : 91.121.+++.++
DNS-Server. . . . . . . . . . . . : 8.8.8.8
8.8.4.4
Primärer WINS-Server. . . . . . . : 8.8.8.8
Sekundärer WINS-Server. . . . . . : 8.8.8.8
NetBIOS über TCP/IP . . . . . . . : Deaktiviert

C:\
Ein ifconfig -a von dem Server aus mit Connect-VPN

Code:
ppp0 Link encap:Point-to-Point Protocol
inet addr:91.121.++.+++ P-t-P:91.121.++.+++ Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:437 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:26339 (26.3 KB) TX bytes:128 (128.0 B)
Ein ip addr show im Connect-VPN Zustand:
Code:
ip addr show
1: lo: 
Syslog Auszug:
Code:
Jun 2 14:41:19 ks+++++ pppd[6643]: Script /etc/ppp/ip-up finished (pid 6665), status = 0x0
Jun 2 14:41:20 ks+++++ pptpd[6642]: GRE: accepting packet #19
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #20
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #21
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #22
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #23
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #24
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #25
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #26
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #27
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #28
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #29
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #30
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #31
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #32
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #33
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #34
Jun 2 14:41:21 ks+++++ pptpd[6642]: GRE: accepting packet #35
Jun 2 14:41:22 ks+++++ pptpd[6642]: GRE: accepting packet #36
Jun 2 14:41:22 ks+++++ pptpd[6642]: GRE: accepting packet #37
Jun 2 14:41:22 ks+++++ bcrelay[5089]: UDP_BroadCast(sp=68,dp=67) from: ppp0 relayed to: eth0 eth0:1
Jun 2 14:42:13 ks+++++ pptpd[6642]: GRE: accepting packet #245
Jun 2 14:42:13 ks+++++ pptpd[6642]: GRE: accepting packet #246
Jun 2 14:42:13 ks+++++ pptpd[6642]: CTRL: Received PPTP Control Message (type: 5)
Jun 2 14:42:13 ks+++++ pptpd[6642]: CTRL: Made a ECHO RPLY packet
Jun 2 14:42:13 ks+++++ pptpd[6642]: CTRL: I wrote 20 bytes to the client.
Jun 2 14:42:13 ks+++++ pptpd[6642]: CTRL: Sent packet to client
Jun 2 14:42:14 ks+++++ pptpd[6642]: GRE: accepting packet #247
Jun 2 14:42:14 ks+++++ pptpd[6642]: GRE: accepting packet #248
Eintrag in der rc.local
Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT
iptables -P OUTPUT ACCEPT
Ich hoffe das Reicht um ein ersten Einblick zu bekommen, würde mich freuen wenn es jemand gibt der mir Helfen kann.

mfg

Manu