# Help Setting Up Dedicated IP VPN in FreeBSD 12



## greencloud (May 23, 2020)

Hey guys, I just got a dedicated IP from my VPN service provider. I would like to set it up via PPTP protocol. I've tried this before on a Windows and Linux computer but here in FreeBSD I totally don't know where to begin. I just hope somebody could point me to the right direction. I've been using FreeBSD for years now, but this is the first I'm trying to do this kind of setup.

I already have `pptpclient` installed and this is currently what my ppp.conf file look like:


```
default:
    load HK

HK:
    set enddisc LABEL
    set mrru 1500
    set mru 1504
    nat enable yes
    set authname "MY_VPN_USERNAME"
    set authkey "MY_VPN_PASSWORD"
    add! default HISADDR
    disable deflate pred1 lqr
    deny deflate pred1
    set timeout 0
    set ifaddr 0 0
    set mppe 128 *
    enable dns
    disable ipv6cp
```

It doesn't work and I honestly don't know what I'm supposed to have or not to have in these settings. When I try to run it like so:

`sudo pptp 111.222.123.123 HK`

I get this error:

`anon warn[open_inetsock:pptp_callmgr.c:352]: connect: Operation timed out
anon fatal[callmgr_main:pptp_callmgr.c:134]: Could not open control connection to 111.222.123.123
anon fatal[open_callmgr:pptp.c:525]: Call manager exited with error 256
anon fatal[main:pptp.c:394]: Child process died`

Any insights will be greatly appreciated. Thank you very much.


----------



## trev (May 24, 2020)

Do you have a firewall? You need to allow these for PPTP:

IP Protocol=TCP, TCP Port number=1723  [Used by PPTP control path]
IP Protocol=GRE (value 47)  [Used by PPTP data path]
You can check connectivity to the VPN host with:

`$ ping 111.222.123.123`
`$ traceroute 111.222.123.123`
`$ telnet  111.222.123.123 1723`
If the connection to port 1723 is OK, then the VPN will respond. If not, then it will likely just timeout.

If it times out, and you're sure it's not your firewall blocking the connection, you may need to contact your VPN provider.

Curiously,  $ geoiplookup2 111.222.123.123 returns CN, China. Not usually one's first choice for a VPN provider


----------



## greencloud (May 24, 2020)

trev said:


> Curiously,  $ geoiplookup2 111.222.123.123 returns CN, China. Not usually one's first choice for a VPN provider


Thanks trev! The IP address is just for reference, that's not the actual dedicated IP assigned to me


----------



## greencloud (Jun 8, 2020)

I think the right question I should have asked is, *How or is there a way to setup SSTP or IKEv2 protocols in FreeBSD 12*?


----------



## SirDice (Jun 8, 2020)

greencloud said:


> I've tried this before on a Windows and Linux computer but here in FreeBSD I totally don't know where to begin.


What did you use on Linux? OpenVPN? Strongswan? Racoon? Any of these work exactly the same on FreeBSD.


----------



## greencloud (Jun 15, 2020)

Yes SirDice, I know that. I do have OpenVPN and that works with my regular VPN account, the one with dynamic IP addresses. What I want to setup now is my Dedicated IP from my VPN provider. Unfortunately, they don't support Dedicated IP over OpenVPN. In my Linux machine, I tried different protocols but for some reason, it only works with SSTP protocol via the *network-manager-sstp* and *sstp-client* packages.


----------

