# oddest thing: /etc/init.d/ppp0 causes recurtion while pon ok

## nivw

Hi,

when I run /etc/init.d/ppp0 start , I see ppp1-6 devices in ifconfig. I dont have any definition for ppp1-6.

when I run   *Quote:*   

> #pon bgu debug dump logfd 2 nodetach 2>&1 >bgu.pptp.err.log

  all works fine and only ppp0 is created, and communication is good.

/etc/conf.d/net reads:

```

config_ppp0=( "ppp" )

pppd_ppp0=(

  "persist"

  "call bgu"

  "holdoff 10"

#  "mru 1460"

#  "mtu 1460"

)

link_ppp0="pty \"pptp <IP> --nolaunchpppd\""

```

/etc/ppp/peers/bgu reads:

```

remotename bgu

linkname bgu

ipparam bgu

pty "pptp <IP> --nolaunchpppd"

name domain\\user

file /etc/ppp/options.pptp

mtu 1300

mppe required

mppe stateless

usepeerdns

defaultroute

lcp-echo-failure 10

lcp-echo-interval 10

```

/etc/ppp/options.pptp

```
lock

noauth

refuse-eap

refuse-chap

refuse-mschap

nobsdcomp

nodeflate

```

I am using 2.6.10-gentoo-r10 with mppe-mppc build as a module

how can I to fix it, and get the default route via the ppp and not the initial default gateway using the /etc/conf.d/net ?

----------

## xbmodder

Does the init script even create the PtP link?

----------

## nivw

yes, the ppp0 can be created as described in the /etc/conf.d/net quote above

then calling /etc/init.d/net.ppp0 start

but I notice that this causes other ppp devices to appear: ppp1..6

----------

## xbmodder

after running /etc/init.d/net.ppp0 start

then do an:

dmesg

and an 

ifconfig -a

----------

## mrness

1) remove the pty line from bgu file

2) add debug in pppd_ppp0 and see the logs

----------

## GD

same here (pon works /etc/init.d/net.ppp0 doesn't... it won't establish a connection).... here's the logs and configs:

/etc/ppp/peers/altec

 *Quote:*   

> pty "pptp <HOSTIP> --nolaunchpppd"
> 
> name gd
> 
> require-mschap-v2
> ...

 

/etc/ppp/options.pptp

 *Quote:*   

> 
> 
> lock
> 
> noauth
> ...

 

/etc/ppp/chap-secrets

 *Quote:*   

> 
> 
> # Secrets for authentication using CHAP
> 
> # client        server          secret                  IP addresses
> ...

 

/etc/conf.d/net

 *Quote:*   

> config_ppp0=( "ppp" )
> 
> pppd_ppp0=(
> 
>  "persist"
> ...

 

daemon.log using pon ---> everything OK

 *Quote:*   

> 
> 
> Dec 30 18:23:18 offler pppd[19265]: pppd 2.4.4 started by root, uid 0
> 
> Dec 30 18:23:18 offler pppd[19265]: using channel 131300
> ...

 

daemon.log using /etc/init.d/net.ppp0 start---> doesn't work

 *Quote:*   

> 
> 
> Dec 30 18:26:45 offler pppd[19317]: pppd 2.4.4 started by root, uid 0
> 
> Dec 30 18:26:45 offler pppd[19317]: using channel 131301
> ...

 

----------

## mrness

Remove the pty line from /etc/ppp/peers/altec. Don't you see it is duplicated by link_ppp0?

----------

## GD

well... it used to work like this on another computer a few months back and besides, i copied it from the gentoo-wiki.com entry of a pptp microsoft compatible vpn client how-to..

anyway i tried it but it still won't work...

----------

## mrness

 *GD wrote:*   

> Dec 30 18:26:47 offler pppd[19317]: rcvd [LCP ConfReq id=0x1 <auth chap MS-v2> <mru 1460> <magic 0x4adac373>]
> 
> Dec 30 18:26:47 offler pppd[19317]: No auth is possible
> 
> Dec 30 18:26:47 offler pppd[19317]: sent [LCP ConfRej id=0x1 <auth chap MS-v2>]
> ...

 

Looks like your pppd instance refuses to authenticate itself to the peer. Paste here the pppd command line. You can capture it by running "ps -ef | grep pppd".

----------

## GD

/usr/sbin/pppd pty pptp <HOSTIP> --nolaunchpppd unit 0 linkname ppp0 persist defaultmetric 4007 maxfail 0

there u go....

----------

## mrness

That's not the whole line or, if it is, there is something utterly wrong with baselayout! 

Where is "call altec" or "holdoff 10"?

----------

## GD

root       620     1  0 23:43 ?        00:00:00 /usr/sbin/pppd pty pptp <HOSTIP> --nolaunchpppd unit 0 linkname ppp0 persist defaultmetric 4007 maxfail 0

root       995   620  0 23:44 ?        00:00:00 pptp 10.19.143.130 --nolaunchpppd

root      1000 26963  0 23:44 pts/0    00:00:00 grep --colour=auto pppd

Here's the entire output... dunno what's going on...

i'm using hardened gentoo and glibc 2.7-r1 in case it makes any difference and baselayout-2.0.0_rc6 with the pam and unicode use flags set.

----------

## mrness

Then I suggest you open a bug saying that baselayout doesn't honour pppd_${iface}.

----------

## GD

I'll do that... Thanks....

EDIT: Filed Bug: https://bugs.gentoo.org/show_bug.cgi?id=203860

----------

## GD

Partially solved... See bugzilla entry above...

However the solution seems to cause a few warnings, which nonetheless are by no means showstoppers...

----------

