Hi folks. As i promised here we have a small tutorial about setting up a VPN Server in your Linux Box for connecting with your iPhone 4 ( or iPhone 3GS) / iPhone 4S and for use with SiriProxy.
What you need / Prerequesites
- running linux ( examples here are for debian, opensuse, ubuntu)
- Internet access
- some time =)
Installing VPN Server (pptpd)
Installing the VPN Server ( pptpd daemon ) depends on your system. Choose your System:
Debian / Ubuntu
Debian: apt-get install pptpd
Ubuntu: sudo apt-get install pptpd
OpenSuse
zypper install pptpd
Configure your VPN Server
There are 3 important files for running a VPN Server on your Linux Box. The names are different between the Systems, but i show you here how to configure it no matter which linux you use.
pptpd.conf
The most important file is the /etc/pptpd.conf file. for installing my default file please use:
cd /etc
wget http://www.ketchup-mayo-senf.de/blog/pptpd.conf
( For Ubuntu Users use "sudo" in front of this command )
Edit this file and edit the option "remoteip" and set this to an ip-range matching your Network configuration ( in my case 192.168.178.234-238)
options.pptpd
This file includes some minor configurations like dns server etc.
cd /etc/ppp
wget http://www.ketchup-mayo-senf.de/blog/options.pptpd
( For Ubuntu Users use "sudo" in front of this command )
Edit the option "ms-dns" and set ip to your linux box ( or the box which is running fakedns or dnsmasq)
chap-secrets
cd /etc/ppp
wget http://www.ketchup-mayo-senf.de/blog/chap-secrets
( For Ubuntu Users use "sudo" in front of this command )
Here you can edit the user credentials. By default its:
User: KMS
Password: siri
i suggest to change that!
Configure your iPhone
In Settings you'll find a VPN Tab.
- Select "PPTP"
- Description: thats up to you
- Server: your linux box ip ( best use dyndns )
- Account: KMS ( if using default user. else put here your user name)
- Password: siri ( if using default password. else put here your own password)
Thats all. After that you can connect very easy: just enable the slider =)
Questions? Wishes?
If there are questions just lemme know =)
/Matthias
Perfect tutorial for creating the VPN Connection, but nothing is shown in the dns.
Changing the options file and restarting the server leads to:
/etc/init.d/pptpd restart
Shutting down MS VPN server pptpd done
Starting MS VPN server pptpdFATAL: Module ppp_mppe not found.
if you change the file wrong you sometimes get that.
try to stop server and then start it.
and change the right option file :) (there is a "options" file as well which is for the "ppp" ... it affects the connection as well.
=)
hab dein Tutorial durchgemacht,jedoch kommt bei miPhone immer :
Der PPTP-VPN-Server antwortet nicht......
ok, hat sich erledigt.
Funktioniert nun einwandfrei. Danke!
Prima! Was war es denn?
Hallo..
Options.pptpd: ms-dns meine statische ip vom linux server
chap-secrets bearbeiten erklärt sich von selbst..
aber pptpd.conf: wo soll da die remote ip rein?? es steht zwar paar mal remote ip aber alles mit ner Raute davor???
Hat sich erledigt :D
pptpd.conf: Der Router vergibt im Lan ips von 192.168.0.100 bis 199,
welche ip Range stelle ich denn jetzt ein ? (habe zurzeit 100-120)stehen..
options.pptpd: Habe schon dyndns und habe die addi bei msdns eingegeben und im Iphone unter Server natürlich auch .. richtig??
chap-secrets: erklärt sich ja von selbst !!
Muss im Router noch irgendein Port freigegeben werden??
Habe nämlich alles genau so wie es in der Anleitung steht gemacht aber da steht immer pptp vpn server antwortet nicht !
Wozu benötigt man denn ein eigenes iPhone 4s und muss das iPhone 4s dann gejailbreaked sein ?
Könnte man nicht einfach die Daten die vom iPhone ausgelesen werden zum Download bereitstellen ? Wirst du auch deinen Proxy mal Public stellen oder nicht ?
Das waren jetzt eine menge Fragen, würde mich aber über eine Antwort freuen .. ^^
Hey, With the "leagle" release of Siri with Spire, I can't seem to get my iphone 4 to connect to my proxy server. It seems to require you to set a proxy server, and when I put my address into the proxy server, it dosent work, because it is trying to do a cert for siri.myproxy.com instead of the guzzoni.apple.com that is the Common Name for my cert. Is there a way to put two common names in the Cert, so I can use a 4S to get the keys and then use Spire on my iphone 4...
Hallo. wenn ich ein vpn server auf Ubuntu mach funktioniert die sache wunderbar. Nun wenn ich aber Ubuntu Neu starte geht der VPN server nicht mehr auch nicht wenn ich ihn neu Starte... was kann ich da machen das der immer geht?
MfG Pascal
@jaminmc: no but you can setup 2 siriproxy with 2 different certs.
@pascal: du schreibst es geht.. was meinst du denn mit es geht nicht nach neustart?
@christian: ja du kannst auch die ausgelesenen daten eines iphone 4s nehmen. musst keins dran verbinden. einen public server wird es von mir nicht geben.
I've set up the VPN server but when i try to connect to the server with my iphone 4 it would get as far as authenticating and then just say display an error: "A connection could not be established to the PPP server. Try reconnecting. If the problem continues, verify your settings and contact your Administrator"
What could have gone wrong? I've made sure my ports are forwarded and all. I'm trying to connect to it via 3G using my external IP as the server IP in the settings and the rest default.
Thanks,
Ich meine damit das dann kommt das der VPN Server die verbindung getrennt hat. und das jedes mal nach dem neustart von ubuntu. wenn ich ubuntu neu aufsetze geht die vpn verbindung auf dem iphone zu ubuntu wunderbar.
Was kann man da machen das man immer mit VPN Connecten kann nicht nur nach dem ersten aufsetzen von Ubuntu
Okay. Problem gelöst warum auch immer. Anderes problem habe ich.. im internen netzwerk kann ich problemlos den vpn benutzen. sollte ich nun aber via dyndns von extern connecten kommt das der pptp server nicht antwortet. Exposed host in der Fritzbox ist auf den Server gegeben. Woran kann das liegen?
I'm confusing with the IP, there are many kinds and
I don't know which one to use
when editing the PPTPD.CONF, do i change the localip to the ip of the linux box or the ip of my internet? and do i change the remoteip?
AND
when editing the options.pptpd, do i change the ms-dns to the ip of linux box or the ip of my internet? do i change the #ms-dns too?
im with Phu on this, VERY confusing
is there another way except vpn server?
So alle probleme gelöst bis auf eins. Wie bekomme ich dieses blöde adress already in use weg.
MfG Pascal
paradox: what is the log saying? (/var/logs)
@ben: yup direct access.
@pascal: wo denn? bei dns? entweder:
/etc/init.d/dns stop
oder
/etc/init.d/dnsmaq stop
Danke ;) jetzt läuft VPN.. anderes problem ist wenn ich dein modifizierter siriServer mit sudo ruby start.rb starte kommt unten der Balken und blinkt. aber nichts passiert weder beim iPhone 4 connect noch beim iphone 4s. die Zertifikate sind alle beide auf guzzoni.apple.com ausgestellt.. woran könnte das liegen?
Log:
PPTP connecting to server '***.**.**.**' *my external IP*
PPTP connection established.
Using interface ppp0
Connect:ppp0 <--> socket [34:17]
LCP terminated by peer (MPPE required but peer negotiation failed)
PPTP error when reading socket : EOF
PPTP error when reading header : read -1, expected 12 bytes
Connection terminated.
PPTP disconnecting...
PPTP Disconnected
paradox: reboot ur box and try vpn in again and check if the error still exists
ok habe alles nach der anleitung auf meinem rootserver (debian lenny) gemacht jedoch kann ich mit dem iphone nicht verbinden (Der PPTP-VPN-Server antwortet nicht......) in der pptpd.conf habe ich als localip die standard ip versucht und die server ip und den remotebereich hab ich auch einiges versucht. in der options datei als ms-dns auf die serverip ist ja klar. was mach ich falsch? kann mir wer helfen?
schau in den logs. /var/logs
und welches file in den logs?
vz275 pptpd[12106]: MGR: Bad IP address (10.5.1.241-246 #015) in config file!
ok da ist der fehler. die frage ist nur wie vergebe ich auf nem vserver oder rootserver den bereich richtig und die locale ip?
vz275 pptpd[12127]: MGR: PPP options file /etc/ppp/options-pptpd#015 not readable
dazu hat er noch diesen fehler was aber quark ist
vz275 pptpd[12127]: MGR: PPP options file /etc/ppp/options.pptpd#015 not readable
vorher wars so beide dateien sind da
beide dateien sind vom filesystem her lesbar auch 755 und 777 getestet immer das gleich
Lachz: das Problem ist, das bei dir beim runterladen es dir die Files verändert hat. Da ist ein ^m als zeilenumbruch drin. Editier die Dateien .. Dann gehts
I have set up the siri proxy,but the spire need a proxy server ,what should i type inside the spire ? i have an iphone 4s connect to proxy server and installed ca.crt on iphone 4 and 4s. can lead me to the next step?should i create an vpn??
how do you setup direct access?
GRE: read(fd=6,buffer=610d20,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Does anybody else have this error in logs?
"Edit the option "ms-dns" and set ip to your linux box"
do i change both ms-dns?
there is:
ms-dns:XXXXXXXXXXX
# ms-dns:XXXXXXXXX
it says on my iphone: "you were disconnected by the communication device.Try reconnecting. If the problems continues, verify your settings."
i don't know what the problem is.. any help?
Habe den pptpd-Server am laufen und kann mich auch drauf verbinden, jedoch bekomme ich dann übers Phone keine INternet-Verbindung und kann somit auch kein Siri nutzen.
Eine Idee woran das liegen könnte?
Guten Rutsch!
Hi, I successfully set up most of a Siri proxy on my computer, I just haven't tried it with an iPhone 4s yet. In order to create a VPN so my iPod touch can connect to the Siri proxy via spire, does the Siri proxy have to be at the house where the 4s is or can I keep the Siri proxy running at my house and still connect via VPN to my Siri proxy here at home while I'm at work or something? Also how do I run the commands in ubuntu if my siri proxy server is still running in terminal? And one more, do you have to authenticate the 4s keys every 24 hours in order for the non 4s device can connect to the Siri proxy and have it work?
Thanks
i had did what exactly you wrote, i had an siriproxy with auto key grabbing which from your tutorials,and when i try to set this pptpd , i slide on vpn on my 4s,it say"The pptpd-vpn server did not respond. try re connecting. if the problem continues, verify your settings and contact your administrator." what should i do?
Hi,
I cant configure the files in etc.
I guess I have no permission.
Could you please note me how to do it?
Thanks, many!
Hello,
I am very dissapointed, while I am trying 2 days now to configure this VPN server.
When my iPhone 4 is connected to my home Wifi, then I can connect through VPN.
When I am over 3G, I just cannot connect.
How I have to edit the files: pptpd.conf and options.pptpd in order to connect?
My server local ip is 192.168.1.116
My external ip is 94.71.201.130
Should I edit dnsmasq.conf file too?
Please help me, I am desperate!!!!
Thanks,
Loukas
I am wondering the same thing as JonnyT
Hey, ich bekomm das nicht hin!
könnt ihr mir vielleicht helfen?
per putty? vil.
danke im voraus. :-)
How do you set up for direct access? That seems like it would be a lot simpler.
Hi,
first of all thanks for your great Tutorials and great work on the SiriProxy!
Everything is running fine for me, except the VPN-Connection to my V-Server.
The 4S can open a VPN Connection without Problems. (Both, the iPhone and the Server (checked via "lsof -i") confirm that they established a connection) But SiriProxy doesn't respond to any Input from the 4S.
If i change the DNS to the IP of my Server on the 4S everything works fine, but not via VPN.
I'm going to post logs next Time i get my Hands on the 4S. But it would be great if somebody already could guess where the matter is.
Regards Rehner
I think it's better to do a Video-tutorial with more details.
To explain what we need to insert in remote ip, remote ip of what ? i will connect from outside, i need an external ip. (for siri to work over 3g).
More details about every ip and dns.
Explain what ip adress we need to put in, exactly.
and for dyndns and no-ip ? we need to pay ?
I have an dyndns account (i pay it 30 dollars/year), i put my dyndns : siri.skandou1988.com, and my external ip adress.
But the status of my dyndns is : pre-activated.
I don't know what i have to do, to ACTIVATE it. can anyone help me pls.
Ich bin deutscher, also auch eine Antwort in Deutsch, nehme ich sehr gerne.
@brian: no only one is enough.
@ben: check logs (/var/logs)
@phil: set up routing right!
calven: check logs (/var/logs)
@Mark: enter "su" then enter root password and work as root.
@Loukas: firewall active maybe? disable it or allow vpn.
@cameron: you need vpn for connecting an 4S iPhone (or wifi)
@Rehner: if you use fakedns server be sure to setup the ip to the ip of the vpn server (not the lan ip!).
alex: warum bezahlst du geld für dyndns? das ist im grundservice kostenlos und ausreichend. siri geht über 3g wenn deine kiste von aussen ereichbar ist und das zertifikat zur dyndns ausgestellt wurde.
Ok, so i have to set "ms-dns" in the options.pptpd to the Server-IP (my machine is a root-server with static IP), right?
Another Question in this Tutorial is for me how to handle the "remote IP" part in pptpd.conf because the server is not part of a network. Can i just choose an IP range?
you can choose whatever range u like. it generates it own subnet anyway.
Hi,
also ich verzweifle an der VPN Verbindung. Ich habe an meinem Router PPTP-Passthrough aktiviert. Sollte also kein Thema sein.
options.pptp
ms-dns 192.168.*.* (meine lokale Server IP-Adresse)
pptpd.conf
remotip 192.168.*.* - 192.168.*.* (lokalen IP AdressBereich)
Was übersehe ich an der Sache? Firewall habe ich testweise schon deaktiviert. Selbes Spiel. Welche Ports habt Ihr wohin weitergegeben auf Euren Routern? Wäre nett wenn mir jemand helfen könnte.
Gruß René
Hey Admin,
ich habe mal eine Frage.
Ich suche bereits seit Tagen einen Weg den Proxy Server zum Laufen zu bringen.
In der Datei "pptpd.conf", muss man ja eine Range bzw. eine IP angeben die das Iphone für die VPN Verbindung bekommen soll.
Ich habe einen Root-Server 1 öffentlichen festen IP-Adresse.
Kann das funktionieren oder muss ich erst noch einen DHCP Server darauf einrichten ? Sonst habe ich vom Provider keine IP-Adresse vom Router zugewiesen bekommen und somit auch keine Range.
Wäre Lieb wenn du mir helfen könntest
Gruß Jonas
Hi,
mein Problem ist das wenn ich von zuHause aus lokal VPN nutze es funktioniert aber bei meinem Cousen sein 4S (wohnt weiter weg) bei dem geht das nicht ich wollte an seine keys kommen alles funktioniert bis auf das vpn was habe ich falsch gemacht kannst du mir helfen?
Danke im Voraus
Gruß Ferhat
Hey Admin,
habe es mittlerweile hinbekommen, den Zeilenumbruch aus der pptpd.conf zu entfernen, aber jetzt zeigt mir das syslog an:
pptpd[3951]: MGR: PPP options file /etc/ppp/pptpd-options#015 not readable
Ich brauche dringend Hilfe! Ich habe Rechte verändert, habe die pptpd-options nochmal komplett neu runtergeladen und auch Zeilenumbrüche entfernt...Alles half nichts!
Bitte versucht wenigstens zu helfen!
Mit freundlichen Grüßen,
Matias
i follow all setp but now working with me can u help me?
Help help help..:( vpn vpn vpn :(
Hi Matthias,
Thank you for your tutorial. After all the googling, your VPN tutorial is the best on the net. So right now I have a laptop running Ubuntu in VirtualBox, which is running SiriProxy. This laptop is connected via Ethernet. This laptop is home and I want to access this proxy remotely from somewhere far away (international). Now let us say that I have a 3G capable iPad (I don't but I made it so that it can), would using VPN be very slow for Siri? Is it even worth it?