[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: demand dialing with pppconfig



John Schmidt wrote:
Hi,

I use pppconfig to set up my modem for dialout. Everything works well if I use pon/poff from the command line. However, I would like to use demand dialing. I turned on demand dialing via pppconfig and also did a pon to start up pppd. I looked at /var/log/syslog to verify that pppd was on -- it was. An excerpt from my syslog shows that both my local and remote IP were set immediately without my modem dialing out:

Sep 22 18:51:02 golden modprobe: modprobe: Can't locate module char-major-108
Sep 22 18:51:02 golden pppd[11431]: pppd 2.4.1 started by root, uid 0
Sep 22 18:51:02 golden pppd[11431]: Using interface ppp0
Sep 22 18:51:02 golden pppd[11431]: Couldn't set pass-filter in kernel: Invalid
argument
Sep 22 18:51:02 golden pppd[11431]: Cannot determine ethernet address for proxy
ARP
Sep 22 18:51:02 golden pppd[11431]: local  IP address 10.64.64.64
Sep 22 18:51:02 golden pppd[11431]: remote IP address 10.112.112.112
Sep 22 18:51:26 golden kernel: Packet log: output DENY ppp0 PROTO=6 10.64.64.64:3817 128.110.42.7:22 L=60 S=0x00 I=50598 F=0x0000 T=64 SYN (#5) Sep 22 18:51:29 golden kernel: Packet log: output DENY ppp0 PROTO=6 10.64.64.64:3817 128.110.42.7:22 L=60 S=0x00 I=50599 F=0x0000 T=64 SYN (#5) Sep 22 18:51:35 golden kernel: Packet log: output DENY ppp0 PROTO=6 10.64.64.64:3817 128.110.42.7:22 L=60 S=0x00 I=50600 F=0x0000 T=64 SYN (#5) Sep 22 18:51:47 golden kernel: Packet log: output DENY ppp0 PROTO=6 10.64.64.64:3817 128.110.42.7:22 L=60 S=0x00 I=50601 F=0x0000 T=64 SYN (#5)


I also have ipmasq installed on this machine. I only use the firewalling rules that come as default. In the above snippet, I tried to access a machine at 128.110.42.7, but am denied. Or I should say that my modem is not dialing out and setting up "legitimate" local and remote IP that I would normally see with pppd running via manual pon/poff sequences. A couple of questions:

1. Should the local and remote IPs be set as they are when pppd is started with demand dialing in effect?

2. Is ipmasq somehow messing things up with demand dialing such that some configureation needs to be adjusted for the two to play along together?

3. Should I also set: /proc/sys/net/ipv4/ip_forward and /proc/sys/net/ipv4/ip_dynaddr to 1?

Another thing I observed when I was playing around with pppconfig, that when I went to change a setting back (turn off demand dialing), the file in /etc/ppp/peers/provider was not edited correctly, in that the changes were at the bottom of the file. A quick edit of the file got things working with the manual pon/poff sequence.

Thanks,

John Schmidt






I have done this in the past, and it worked well. I now run a Cable Modem Internet connection, but maybe I can recall all the steps.

1. In setting up demand dialing with pppconfig, you have to go into the "advanced" section at the end and select "demand". It looks like you found this one. I used the "provider" profile in pppconfig, and I think some of the other scripts involved depend upon using this name.

2. If you look at /etc/init.d/ppp you will see some instructions at the top of the file for other changes you have to make. Mainly you have to rename the "/etc/ppp/no_ppp_on_boot" file to "/etc/ppp/ppp_on_boot". There are some other instructions contained in this re-named file. You should open it up with an editor and read it. You may or may not have to make some further changes depending upon your setup.

3. I didn't have to mess with the local and remote IPs with the above. These were taken care-of automatically. About the only other setting to worry about is the "use peerdns" setting, which you probably already have set correctly with your current setup.

4. If you are running ipmasq and/or a firewall, you will probably have an additional problem. Most programs I have seen depend upon having an external interface and an external IP defined (existing) before you start the ipmasq/firwall. In demand-dialing with DHCP IP assignment, neither of these exist until you make the connection. This is the classic "chicken and egg" problem! The way around this is to start up your ipmasq/firewall program every time AFTER you establish a connection with pppd. This is easily done by adding a small executable "start" script pointing towards your ipmasq/firewall program in /etc/ppp/ip-up.d/ directory. Be careful what you name this script. You want it to fire up fairly quickly, and before any of the other scripts in this directory that depend upon an internet connection are run. Those are mainly for your MTA (posfix, exim, sendmail). The scripts in this directory are run in "cannonical order" (whatever that means), so the name you give it is important.

Those were the major "gotchas" that I can remember. If things are working OK, you should see an instance of pppd in a "ps aux" running in the background before you make a connection. This is as it should be, as the pppd scripts are run right up to the point of dialing out and just sit there waiting for a "trigger" packet to set it off. Bringing up any Internet Application, such as Mozilla, should kick off the dialer. There are some timing options in the "advanced" section of pppconfig that you might want to play around with IF the default values don't suit you. I would advise running it for a while and see what happens.

Hope this helps!

Cheers,
-Don Spoon-




Reply to: