Usage of filters in pppd

Usage of filters in pppd

Post by Bonz » Fri, 21 Dec 2001 08:51:50



I'm very confused as to the use of the active-filter and pass-filter
options for pppd. The man page doesn't appear to be very explicit about
how the filters are actually used.

For example, I would like to stop udp packets with destination address
239.255.255.250 and port 1900 from being counted as packets affecting the
idle timeout that I have set.

The question boils down to this: how do I code the filter expression so
that these packets are ignored? Is this possible? Or will the firewall
which is already denying them get in the way?

TIA

--
mike

 
 
 

Usage of filters in pppd

Post by Dean Thompso » Sat, 22 Dec 2001 10:19:07


Hi!,

Quote:> I'm very confused as to the use of the active-filter and pass-filter
> options for pppd. The man page doesn't appear to be very explicit about
> how the filters are actually used.

> For example, I would like to stop udp packets with destination address
> 239.255.255.250 and port 1900 from being counted as packets affecting the
> idle timeout that I have set.

> The question boils down to this: how do I code the filter expression so
> that these packets are ignored? Is this possible? Or will the firewall
> which is already denying them get in the way?

I remember reading or being told somewhere that these filters are not
implemented on any other distribution of PPP other than the BSD version.  As a
result, playing around with these filters will only waste your time unless you
are using a BSD system.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

Usage of filters in pppd

Post by Mike F » Sun, 23 Dec 2001 08:59:03


On Fri, 21 Dec 2001 01:19:07, Dean Thompson


> > The question boils down to this: how do I code the filter expression so
> > that these packets are ignored? Is this possible? Or will the firewall
> > which is already denying them get in the way?

> I remember reading or being told somewhere that these filters are not
> implemented on any other distribution of PPP other than the BSD version.  As a
> result, playing around with these filters will only waste your time unless you
> are using a BSD system.

Thanks Dean. Using RH6.2 and that's what all the docs seem to imply. It
looks like I'm SOL when it comes to using the idle timer to take the PPP
connection down. These packets come in at fairly random intervals and
are what are keeping the connection up longer than necessary. Oh well!
Back to the tried and tested ppp-off method!

--
Regards, Mike Fry

 
 
 

Usage of filters in pppd

Post by Bill Unr » Sun, 23 Dec 2001 09:40:51



]On Fri, 21 Dec 2001 01:19:07, Dean Thompson

]> > The question boils down to this: how do I code the filter expression so
]> > that these packets are ignored? Is this possible? Or will the firewall
]> > which is already denying them get in the way?
]>  
]> I remember reading or being told somewhere that these filters are not
]> implemented on any other distribution of PPP other than the BSD version.  As a
]> result, playing around with these filters will only waste your time unless you
]> are using a BSD system.
]>  

]Thanks Dean. Using RH6.2 and that's what all the docs seem to imply. It
]looks like I'm SOL when it comes to using the idle timer to take the PPP
]connection down. These packets come in at fairly random intervals and
]are what are keeping the connection up longer than necessary. Oh well!
]Back to the tried and tested ppp-off method!

The old diald ( which seems to have fallen out of favour since demand
option was configured into pppd) apparently did a much better job of
filtering out such garbage in deciding when the link should go down.
You might find diald again and try that.

 
 
 

Usage of filters in pppd

Post by Clifford Kit » Sat, 05 Jan 2002 06:12:22



> I'm very confused as to the use of the active-filter and pass-filter
> options for pppd. The man page doesn't appear to be very explicit about
> how the filters are actually used.
> For example, I would like to stop udp packets with destination address
> 239.255.255.250 and port 1900 from being counted as packets affecting the
> idle timeout that I have set.
> The question boils down to this: how do I code the filter expression so
> that these packets are ignored? Is this possible? Or will the firewall
> which is already denying them get in the way?

First you are likely to need a 2.4.x kernel and pppd 2.4.1.  I'm currently
running pppd 2.4.1 under the 2.4.12 kernel.  The active-filter option
actually works to some extent (unknown) in Linux.

You are correct.  The man pages fail abysmally in explaining how the
active-filter option is applied.  Apparently if the filter expression
is true then matching packets do not count against idle time - which
is just the opposite of what one might think.  The meaning in tcpdump
is that if the expression is true then the packet is dumped to standard
output, and otherwise the packet is ignored.  The active-filter analogy
would be that matching packets are counted against idle time, which is
not what happens.

I found that this is the case this morning when I needed something that
would prevent keepalive packets sent by a client on my host from a
certain port to a dynamic DNS server from counting against idle time.
This is what worked for me:

active-filter 'src port pulse'

(pulse is the name I associated with the port number in /etc/services.)

Assuming that the port is at the destination host, this should work
for you:

active-filter 'dst host 239.255.255.250 and dst udp port 1900'

If the firewall is on the destination host then it will get the packets
and if it responds with an "unreachable" or "prohibited" message then
then these responses will count against idle time.  In that case I can
see two avenues of approach.

Try to find a way to use the active-filter, and/or the pass-filter option
to keep the responses from counting against idle time.  I haven't explored
this possibility.

Patch pppd 2.4.1 with the simple patch in the file auth.c.diff-2.4.1.gz
at http://users3.ev1.net/~ckite/public_html/ in the "Files for download"
section so pppd will not count any incoming traffic against idle time.

-- Clifford Kite  <Email: Presently not available>
/* ... packets usually cross many administrative boundaries on their way
   from a source to a destination and often the only point of agreement
   between those separate administrations is that all problems are someone
   else's fault.   --Van Jacobson, abstract of April 97 MSRI talk */

 
 
 

Usage of filters in pppd

Post by Clifford Kit » Sat, 05 Jan 2002 08:08:35



> I found that this is the case this morning when I needed something that
> would prevent keepalive packets sent by a client on my host from a
> certain port to a dynamic DNS server from counting against idle time.
> This is what worked for me:
> active-filter 'src port pulse'
> (pulse is the name I associated with the port number in /etc/services.)

My bad.  I didn't do enough testing.  Adding that option causes pppd
to idle off in the time set for idle regardless of what other traffic
is on the link.

It seems that the active-filter is still not yet ready for prime time.

--
Clifford Kite  <Email: Presently not available>
/*  The generation of random numbers is too important to be left
    to chance.  */

 
 
 

Usage of filters in pppd

Post by Mike Fr » Sat, 05 Jan 2002 08:46:06




>>I found that this is the case this morning when I needed something that
>>would prevent keepalive packets sent by a client on my host from a
>>certain port to a dynamic DNS server from counting against idle time.
>>This is what worked for me:

>>active-filter 'src port pulse'

>>(pulse is the name I associated with the port number in /etc/services.)

> My bad.  I didn't do enough testing.  Adding that option causes pppd
> to idle off in the time set for idle regardless of what other traffic
> is on the link.

> It seems that the active-filter is still not yet ready for prime time.

It seems that unless I upgrade from RH6.2 I'm not going to get my wish
just yet. Thanks for all the information anyway. I'll just have to learn
to live with all these effing M$ machines that are the ones sending the
packets in the first place :-)
 
 
 

1. pppd dial ins and , "LCP: timeout sending Config-Requests"

Hi, Ive setup pppd to accept dialins on FreeBSD 4.3,
this is what i got in /var/log/messages when people try to connect:

Jul 15 21:42:19 e-l33t pppd[25891]: Connect: ppp0 <--> /dev/ttyd0
Jul 15 21:42:49 e-l33t pppd[25891]: LCP: timeout sending Config-Requests
Jul 15 21:42:49 e-l33t pppd[25891]: Connection terminated, connected for 1
minutes

now , I read somewhere that this could have something to do with gre
stealing the lcp packets,
 but i'm sure i didnt compile gre into my kernel.

( Also, I set the modem to ATS0=1 and saved it with AT&W0 , so it auto
answers, and this works fine )

# cat options
            ms-dns 192.168.0.2
            domain lamenet.org.au
            lock
            proxyarp
            crtscts
            115200
            modem
            +pap
            lcp-max-configure 40 // recently added, not tested
#
# cat pap-secrets
# Secrets for authentication using PAP
# client        server  secret          acceptable local IP addresses
  dialin        *       "password"        *
#
# cat options.ttyd0
192.168.0.7:192.168.0.8 # ip's of local and remote hosts

# cat options.ttyd1
192.168.0.7:192.168.0.8 # ip's of local and remote hosts
#

And in /etc/ttys

# cat /etc/ttys | grep ppp
ttyd0   "/usr/sbin/pppd"                dialup  on  secure
ttyd1   "/usr/sbin/pppd"                dialup  on  secure
#

Thanks :)

2. problem with DOSEMU + emumodule

3. Filters, Filters, where are you Filters...

4. Memory issues in using JNI

5. Solaris 2.6 and printcap filter usage

6. another networking problem

7. PPPD memory usage

8. Carriage return problem????

9. pppd memory usage

10. Does pppd-2.4.0 support "active-filter"?

11. PPPD's pass-filter option

12. pppd is not accepting active filters!!!!

13. Most useful pppd active-filter string for Linux