Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!gatech!newsfeed.pitt.edu!news.pgh.net!w2xo.pgh.pa.us!durham From: Jim Durham <durham@w2xo.pgh.pa.us> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Dial-on-demand internet connection? Date: Fri, 18 Aug 1995 16:39:04 -0400 Organization: Pittsburgh OnLine, Inc. Lines: 62 Message-ID: <Pine.BSF.3.91.950818151824.222C-100000@w2xo.pgh.pa.us> References: <40r65d$bc8@central.co.nz> NNTP-Posting-Host: w2xo.pgh.pa.us Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <40r65d$bc8@central.co.nz> On 15 Aug 1995, Mark Penney wrote: > Hi, > > Has anybody ever set up FreeBSD 2.0 as a dial-on-demand internet gateway? > > My initial requirement if for email. I would like to have my FreeBSD box > on the lan, with a modem hooked up to it. When someone sends email from > Pegasus mail on their PC on the lan it goes to the FreeBSD box that dials > the internet provider (PPP) and sends the email. When it is connected, > and on a regular basis, it would also grab the email that is waiting for > us and put it into users POP mailboxes for them to grab later. > > Later on I would like all outgoing services (telnet, ftp, www, etc.) to > be able to go via the dial-on-demand gateway. > > I know that I can get the provider to not bounce mail for (say) 12 hours, > and I have a domain registered and a class C internet address. What I am > looking for is information on how to set up the FreeBSD box to handle > this, what s/w I need, etc. > I have a "mini" model of your situation here. I have a full-time machine running PPP to an internet provider and a DOS/FreeBSD machine on a LAN here in the house. I have unlimited time usage, but I still feel it's unfair to just dial up and sit there using up telco lines and modems, so.... What I do is run iijppp in the "-auto ondemand" mode. Sendmail is normally flushing it's queue every 30 minutes (default). If there is anything in the queue, iijppp dials out and logs into the server on demand. That solves the outgoing problem. iijppp has a "time out" parameter. I set this up for 15 minutes. If there is no traffic for 15 minutes, the system drops the dial-up. Most systems flush their queues every 30 minutes, and keep trying for at least a couple days to deliver a message. This means that, if you have at least a moderate flow of outgoing mail, you will be up on the net long enough to get your mail just because the iijppp "ondemand" will dial up for a 15 minute stint for every message and these will be at random times. Some systems have queue flushes as infrequently as 2 hours. In order to insure that you get mail from these systems, you can set up a crontab entry to ping the provider's host every , say, 14 minutes for a two hour perios to keep the system on line for a two hour period in the wee hours so that you get mail from these systems. I also have occasion to want to look at my notes, etc, on my system while at work, so I have a couple of times during the day set up in crontab where I ping to bring up the system on the net so I can use it. If only internet providers could use dial-on-demand, but most of them have commercial phone lines and are charged by the call, so they probably don't want to do dial-on-demand, altough I told my friend who is a provider that it would be a terrific incentive, but he felt it would be an accounting problem to pass all the extra phone charges along to the customer, even if they wanted the service. -Jim Durham