# From Linux ppp to FreeBSD mpd5



## martinrame (Apr 22, 2021)

Hi, I'm trying to convert the ppp config from a Linux machine to my FreeBSD's MPD5.

Here is the Linux /etc/ppp/ppers/peervpn file:


```
# written by pptpsetup
pty "pptp peer.vpn.domain --nolaunchpppd"
lock
noauth
refuse-pap
refuse-eap
refuse-chap
nobsdcomp
nodeflate
name myuser
remotename peervpn
ipparam peervpn
require-mppe-128
```

Here is my /usr/local/mpd5/mpd.conf file on FreeBSD. This file was copied from mpd.conf.sample:


```
peervpn
  create bundle static B1                                                                                         
# Enable Microsoft Point-to-Point encryption (MPPE)                                                               
  #set bundle enable compression                                                                                  
  set ccp yes mppc                                                                                                
  set mppc yes e40                                                                                                
  set mppc yes e128                                                                                               
  set bundle enable crypt-reqd                                                                                    
  set mppc yes stateless                                                                                          
                                                                                                                  
  create link static L1 pptp                                                                                      
  set link action bundle B1                                                                                       
# Enable both sides to authenticat each other with CHAP                                                           
  set link no pap chap eap                                                                                        
  set auth authname "myuser"                                                                                       
  set auth password "mypassword"                                                                                     
  set link mtu 1460                                                                                               
  set link keep-alive 10 75                                                                                       
  set link max-redial 0                                                                                           
# Configure PPTP and open link                                                                                    
  #set pptp self 1.2.3.4                                                                                          
  set pptp peer peer.vpn.domain                                                                                
  set link enable incoming                                                                                        
  open
```

When I try to connect I get this:


```
[B1] Bundle: Interface ng0 created
PPTP: waiting for connection on 0.0.0.0 1723
[L1] [L1] Link: OPEN event
[L1] LCP: Open event
[L1] LCP: state change Initial --> Starting
[L1] LCP: LayerStart
[L1] PPTP call successful
[L1] Link: UP event
[L1] LCP: Up event
[L1] LCP: state change Starting --> Req-Sent
[L1] LCP: SendConfigReq #1
[L1]   ACFCOMP
[L1]   PROTOCOMP
[L1]   ACCMAP 0x000a0000
[L1]   MRU 1500
[L1]   MAGICNUM 0xd66f9674
[L1] LCP: rec'd Configure Request #1 (Req-Sent)
[L1]   AUTHPROTO CHAP MSOFTv2
[L1]   MRU 1450
[L1]   MAGICNUM 0x12178462
[L1] LCP: SendConfigRej #1
[L1]   AUTHPROTO CHAP MSOFTv2
[L1] LCP: rec'd Configure Reject #1 (Req-Sent)
[L1]   ACFCOMP
[L1]   PROTOCOMP
[L1]   ACCMAP 0x000a0000
[L1] LCP: SendConfigReq #2
[L1]   MRU 1500
[L1]   MAGICNUM 0xd66f9674
[L1] LCP: rec'd Configure Request #2 (Req-Sent)
[L1]   MRU 1450
[L1]   MAGICNUM 0x12178462
[L1]   AUTHPROTO PAP
[L1] LCP: SendConfigRej #2
[L1]   AUTHPROTO PAP
[L1] LCP: rec'd Configure Ack #2 (Req-Sent)
[L1]   MRU 1500
[L1]   MAGICNUM 0xd66f9674
[L1] LCP: state change Req-Sent --> Ack-Rcvd
[L1] LCP: rec'd Configure Request #3 (Ack-Rcvd)
[L1]   MRU 1450
[L1]   MAGICNUM 0x12178462
[L1] LCP: SendConfigAck #3
[L1]   MRU 1450
[L1]   MAGICNUM 0x12178462
[L1] LCP: state change Ack-Rcvd --> Opened
[L1] LCP: auth: peer wants nothing, I want nothing
[L1] LCP: authorization successful
[L1] Link: Matched action 'bundle "B1" ""'
[L1] Link: Join bundle "B1"
[B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps
[B1] IPCP: Open event
[B1] IPCP: state change Initial --> Starting
[B1] IPCP: LayerStart
[B1] IPCP: Up event
[B1] IPCP: state change Starting --> Req-Sent
[B1] IPCP: SendConfigReq #1
[B1]   IPADDR 192.168.100.111
[B1]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[L1] LCP: LayerUp
[L1] LCP: rec'd Terminate Request #4 (Opened)
[L1] LCP: state change Opened --> Stopping
[L1] Link: Leave bundle "B1"
[B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
```

Can anyone help me with this?.


----------



## covacat (Apr 22, 2021)

try 

set link accept chap
instead of no pap chap eap


----------



## martinrame (Apr 22, 2021)

Thanks, that worked. Now I have to figure out how to remplace `ip route add 192.168.1.0/24 dev ppp0` to something for FreeBSD.


----------



## covacat (Apr 22, 2021)

*set iface route default 
or use an iface up script


			Interface layer
		

*


----------

