# Everytime i boot my gentoo i need to run pppoe-setup

## Ayer Killing Spree

the files pap-secrets and chap-secrets are blank

everytime i boot my gentoo i need to run pppoe-setup, so it write the files (pap and chap) again and i can connect my adsl

the pppoe.conf don't reset, only the chap and pap-secrets

sorry my english, i'm from Brazil

i'm waiting a reply on the portuguese section but it's taking too much time

thanks in advance

----------

## f.meltzer

i would think you're running adsl-setup not pppoe-setup. small mistake or different app?

anyways. i'm running a router with pppoe (roaring pengiun) and never used the adsl-setup, adsl-start, adsl-stop script approach from roaring penguin. my setup uses the rc-script configured in /etc/conf.d/net, which brings up the pppoe session at the default runlevel. the passwordfiles in /etc/ppp/ was edited manually, not by ' adsl-setup '.

as said, this is a router doing nat (among other things), and one of two nic's is used to do pppoe. i don't know if this would help you, but have a look at the home router guide here -> http://www.gentoo.org/doc/en/home-router-howto.xml#doc_chap3 .

hopefully, this info would help you...

----------

## Reikinio

It should be simple, you only need to run adsl-setup once, then configure /etc/conf.d/net 

What makes you think pap-secrets and chap-secrets get erased ?

Check /etc/conf.d/net, for example this two lines:

```

config_eth0=( "adsl" )

adsl_user_eth0="blabla"

```

----------

## Ayer Killing Spree

 *Reikinio wrote:*   

> It should be simple, you only need to run adsl-setup once, then configure /etc/conf.d/net 
> 
> What makes you think pap-secrets and chap-secrets get erased ?
> 
> Check /etc/conf.d/net, for example this two lines:
> ...

 

when i run pppoe-setup the pap and chap-secrets have a: "myusername" * "mypasswd"

when i boot my gentoo it's only: " " MyPeer " "

i don't know why

my /etc/conf.d/net:

iface_eth0="dhcp"

i changed into:

config_eth0=( "adsl" )

adsl_user_eth0="username@bla.com.br"

just this solves?

i can't see because i can't reboot my computer now

----------

## f.meltzer

i suggest you edit manually both /etc/ppp/pap-secrets and /etc/ppp/chap-secrets before reboot. they should be

```

"username"     *       "password"

```

----------

## Ayer Killing Spree

i tried the reikinio solution but it didn't work

i'll try yours later, thanks!

----------

## Ayer Killing Spree

my solution:

i made a .bashrc that to this:

alias conectar="cp /etc/ppp/pap-secrets-bak /etc/ppp/pap-secrets; cp /etc/ppp/chap-secrets-bak /etc/ppp/chap-secrets; pppoe-start"

my pap and chap-secrets-bak have the correct line with "user" * "passwd"

----------

## fusel

Hi,

I dont want to start a new topic for this, because i got exactly the same problem. I was asked to setup a "fire up and forget"-firewall with vpn support for some roadwarriors. 

Whatever, back to topic: Whenever I reboot my machine, my pap-secrets and chap-secrets gets overridden with the content of /etc/ppp/peers/MyPeer. Well, I thought that could have been some default profile, so I deleted them. But you know, there is always murphy: the file was again created from somewhere after the reboot!

Because the machine needs to run totally unmanaged, I can't use this rc-script.

Oh, btw, I am using rp-pppoe for the ADSL uplink to the internet.

packages used

Linux fw 2.6.16-gentoo-r3 #2 PREEMPT Sun Apr 23 11:59:51 CEST 2006 i686 Pentium III (Coppermine) GNU/Linux

net-dialup/rp-pppoe 3.7

net-dialup/ppp 2.4.2-r15

There is also running Shorewall (managing iptables), OpenSWAN, l2tpd and a bit more.

Any help would be great.

----------

## hokstein

 *Ayer Killing Spree wrote:*   

>  *Reikinio wrote:*   It should be simple, you only need to run adsl-setup once, then configure /etc/conf.d/net 
> 
> What makes you think pap-secrets and chap-secrets get erased ?
> 
> Check /etc/conf.d/net, for example this two lines:
> ...

 

Here's what worked for me: I changed that file to config_eth0=( "adsl" ) and then ran pppoe-setup (or adsl-setup, depending on your version of rp-pppoe). I didn't change any config files aftwerwards, and I didn't include my username in /etc/conf.d/net. BTW, I'm also from Brazil, using the Speedy ADSL service.

----------

## cmd1234

Has anyone come up with why this happens as I get the same problem with a newly set up server.

Every time a client connects the chap-secrets file goes back to being "user" * "passwd", and it happens as the connection goes up

I am using

net-dialup/ppp 0.3.23

net-dialup/pptpd 1.3.3

----------

## mutant_tentacle

Searching the forums led me to a bunch of threads that seemed to talk about this problem.  When I came home from work today I noticed every clock in the house blinking 12:00.  Goddamnit!  So I booted up my Gentoo router (since it doesn't automatically come back up) and found out I had no route to the Internet.  After some futzing around, I noticed this same behavior: using pppoe-setup followed by a pppoe-start seems to authenticate with my ISP no problem.  Using the bootscripts, I consistently get LCP failure messages.  Some script somewhere is reading the wrong information, and I don't have the know-how or the desire to wade through the entire boot script process to figure it out.  For the time being, I can create a route manually and get by with that, but if I reboot I'm back to no Internet.  Unacceptable.

I'm going to hunt around a little bit and see what I can turn up.  As much as I like Gentoo, fixing a problem like this in a Slackware bootscript would have taken two minutes...

----------

## mutant_tentacle

Okay, I fixed it.  First off, I'm running the following versions of these packages:

net-dialup/rp-pppoe-3.8

net-dialup/ppp-2.4.4-r4

It looks like they are phasing out rp-pppoe in favor of pppd.  So, this means some configuration has to change.  I ran the pppoe-setup script first to make sure I had the right information entered into the right places.  Next I made sure that /etc/init.d/net.ppp0 was a symlink to net.lo, so that all of my network interfaces come up using the same script.  Last, I edited the /etc/conf.d/net file and made the following changes:

```
config_eth0=( "null" )

config_eth1=( "192.168.1.65/26" )

config_eth2=( "192.168.1.129/26" )

config_ppp0=( "ppp" )

link_ppp0="eth0"

plugins_ppp0=( "pppoe" )

username_ppp0='myname@myisp.com'

pppd_ppp0=( "updetach" "debug" "defaultroute" "usepeerdns" )
```

My PAP password is still read from /etc/ppp/pap-secrets.  I could pass it as an argument to pppd, but then anybody could see it by running ps.  Hope this helps anyone who comes home after a long day at work and finds their Internet broken.    :Evil or Very Mad: 

- Kiel

----------

## mrness

1) if you set the password through /etc/conf.d/net, it will not be passed through command line nor through secrets file. How is it done exactly, it is left as an exercise for the curious reader.

2) rp-pppoe has been phased out a long time ago, although it pretty much work as before (set username and password in conf.d/net).

3) If you searched for the relevant info in net.example, you had been set your PPPoE link in no time.

----------

