Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto: pppd closes connection even with incoming traffic now
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 342
Location: Berlin

PostPosted: Tue Sep 02, 2003 6:54 pm    Post subject: howto: pppd closes connection even with incoming traffic now Reply with quote

Hi,
there seem to be very little topics dealing with active-filter here and what it is good for. I thought I would just describe my experience:

I've got a DSL router running with dial on demand and a timeout of 600 seconds (/etc/ppp/pppoe.conf: DEMAND=600). There is also a firewall (iptables) blocking unallowed input packages.

The problem: Due to large amounts of unrequested incoming packages pppd never terminates the connection. Check your /var/log/syslog (if you log these kind of packages with iptables). It's surprising.

To make the timer count only outgoing traffic and ignore incoming do the following:

(1) Check if your kernel has set CONFIG_PPP_FILTER=y in /usr/src/linux/.config. If not you have to recompile the kernel.
(2) emerge libpcap
(3) Add "activefilter" to your USE var. This will compile ppp with active-filter option.
(4) emerge ppp. If you have it already, do it again.
(5) Add this line to /etc/ppp/options:
Code:

active-filter 'outbound and not icmp[0] == 3 and not tcp[13] & 4 != 0'

So, now pppd closes the connection after 600 seconds as it should even if there was incoming unwanted traffic in the meantime.
Back to top
View user's profile Send private message
FallenAngel
n00b
n00b


Joined: 29 Sep 2004
Posts: 51

PostPosted: Wed Sep 29, 2004 3:02 pm    Post subject: Reply with quote

Seems you need libpcap-0.7.2, because newer versions no longer support 'outbound' on ppp devices
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 342
Location: Berlin

PostPosted: Tue Oct 05, 2004 9:58 am    Post subject: Reply with quote

True. (And on that machine I even use a kernel version 2.4.x.)

However, how can we upgrade to libpcap-8.x and use outbound filter nevertheless?

Is it true that with newer kernels (>2.6.5) and libpcap-8.x we can set an outbound filter in the kernel again? Did anyone get it to run again?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum