ppp won't start

After upgrading to 8.1 (clean install on i386) ppp doesn't start after system boot.
In /etc/rc.conf lines are
Code:
ppp_enable="YES"
ppp_profile="ocap"
ppp_mode="ddial"
ppp_nat="YES"
Nothin in logs, it just doesn't start. But if I "ssh" after boot and manually run
Code:
ppp -ddial ocap
everything works fine. Does anyone met such problem? How did you solve it? Found some recommendations move to mpd but it's what happened to ppp than? :\
 
See if [cmd=]dmesg -a[/cmd] or a verbose boot (menu option 5) give more detailed remarks/errors.
 
Look for errors in /var/log/ppp.log
 
Code:
Starting PPP profile:
 ocap
and
Code:
Starting natd.
Loading /lib/libalias_cuseeme.so
Loading /lib/libalias_ftp.so
Loading /lib/libalias_irc.so
Loading /lib/libalias_nbt.so
Loading /lib/libalias_pptp.so
Loading /lib/libalias_skinny.so
Loading /lib/libalias_smedia.so
natd:
unknown interface name tun0
are only records in verbose loading log.
/var/log/ppp.log is clean, no any record that correspond to the boot up time.
NATd doesn't start because there is no tun0 yet and this seems to be logical.
/etc/ppp/ppp.conf is below. And again - manual run $ ppp -ddial ocap gets it started.
Code:
default:
        set log Phase Chat LCP IPCP CCP tun command
        ident user-ppp VERSION
        accept lqr
        set lqrperiod 30

ocap:
        set log Warning Error
        set device PPPoE:xl0:<TAG>
        set authname <LOGIN>
        set authkey <PASSWORD>

        set cd 5
        set mru 1492
        set mtu 1492

        set timeout 180
        set redial random 0

        set dial
        set login
        add default HISADDR

        nat enable yes
        nat log yes
        nat same_ports yes
        nat unregistered_only yes

        nat port tcp <iIP>:<iPORT> <ePORT>
        ...
        ...
 
Oh, one more thing:
$ /etc/rc.d/ppp onestart
and
$ /etc/rc.d/natd onestart
also run both successfully (sure natd would run 5-7 seconds later, when tun0 will be up & running.
 
Are you able to see the startup messages on the console? The ppp startup script should emit "Starting PPP profile" during startup.
 
Yes, there is a message followed by profile name but ppp doesn't actually start or fail.
 
Code:
set log local Phase Chat Connect LCP IPCP CCP CBCP tun command
Maybe try that in ppp.conf so more verbose errors are seen on the screen? (Maybe not, Unsure if /dev/tun is the pppd device, the parameters refer to stuff used by pppd rather than the client that uses the ppp.conf file, and other reasons why it might be irrelevant. The key words are "set log local" I think...)
 
Got it! Set /usr/local/bin/bash for root but bash can't be run while loading.

Code:
/libexec/ld-elf.so.1:  Shared object "libintl.so.9" not found, required by "bash"

Damn. Why that worked on 7.x and doesn't on 8.x...
 
Yep. But why that worked on 7.x and doesn't on 8.x That's a question.
Another problem arose. On 7.3 ppp was called with ppp nat option and ppp was running nat automatically after tun0 was created. Now, under 8.1 /etc/rc.conf has same lines (ppp_enable, ppp_nat, natd_enable etc.), but it seems that natd starts before tun0 is created and sure it fails.
Any ideas where to dig?
 
You do not need natd if you are using ppp's nat. It's only needed for non-ppp interfaces.

But if you want to dig, you probably need to edit the REQUIRES lines in the RC scripts in /etc/rc.d/ and then test with rcorder(8).
 
First, don`t touch the user root and use sh shell, second the libraries are always strict and if u move sth
that doesn`t correspond,this link can be broken.

see the /etc/shells:

Code:
[root@ingsys.cl ~]# tail /etc/shells

/bin/sh
/bin/csh
/bin/tcsh
/usr/local/bin/bash  << bash located is /usr/local and its libraries in /usr/local/lib.
/usr/local/bin/rbash

So u can do this:

cp /usr/local/lib/libintl.so.9 /lib/libintl.so.9
cp /usr/local/lib/libiconv.so.3 /lib/libiconv.so.3
 
Yes, it's always an excellent idea to mix port libraries with base system libraries. It encapsulates the FreeBSD philosophy so well.
 
Code:
unknown interface name tun0

are you using the GENERIC kernel or a custom one? 'cause i got the same error when i tried to run ppp without tun built in kernel.

and

Code:
set device PPPoE:xl0:<TAG>
should be
Code:
set device PPPoE:xl1 # replace xl1 with your Ethernet device
 
As aragon stated, you don't need natd if you are using the ppp_nat functions.

But, if you want to use something like that you have to add it to /etc/ppp/ppp.linkup, so it will be called after the connection establishment (and so tun0 will be there with your new IP).

Please note that you need to add the command under the same 'label' you had used on ppp.conf.

Even if you play with rcorder(8) there are no guarantees, since you don't know exactly how much time the ppp would need to establish the connection.

Please check the ppp(8) man page for more details about ppp.linkup and ppp.linkdown.
 
Back
Top