Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]havp spawn unlimit count of processes
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
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3809
Location: Hamburg

PostPosted: Tue Jun 29, 2010 6:09 pm    Post subject: [solved]havp spawn unlimit count of processes Reply with quote

I used an "uncommon" scenario : I emerged net-proxy/havp-0.90-r1:0 and app-antivirus/clamav-0.96.1:0 (but not squid), configured havp a little bit:
Code:
n22 /etc/havp # grep -v -e '#' -e '^$' havp.config
LOGLEVEL 1
TRANSPARENT true
ENABLECLAMLIB true
ENABLECLAMD false
ENABLEFPROT false
ENABLEAVG false
ENABLEAVESERVER false
ENABLESOPHIE false
ENABLETROPHIE false
ENABLENOD32 false
ENABLEAVAST false
ENABLEARCAVIR false
ENABLEDRWEB false
added this to my iptables :
Code:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

started havp and pointed my firefox to http://localhost:8080.
Then I observed this in /var/log/havp/error.log :
Code:
...
1 S havp     25749 25365  0  80   0 - 34761 poll_s 20:00 ?        00:00:00 /usr/sbin/havp
1 S havp     25750 25365  0  80   0 - 34761 poll_s 20:00 ?        00:00:00 /usr/sbin/havp
1 S havp     25751 25749  0  80   0 - 34761 locks_ 20:00 ?        00:00:00 /usr/sbin/havp
1 S havp     25752 25750  0  80   0 - 34761 locks_ 20:00 ?        00:00:00 /usr/sbin/havp
...
Furthermore more and more havp processes were spawned.
Is this a bug or the result of the configuration ?


Last edited by toralf on Mon Jul 05, 2010 7:33 am; edited 1 time in total
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sun Jul 04, 2010 9:40 pm    Post subject: Re: havp spawn unlimit count of processes Reply with quote

Have you tried to connect directly to HAVP without using port redirection?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3809
Location: Hamburg

PostPosted: Mon Jul 05, 2010 7:33 am    Post subject: Re: havp spawn unlimit count of processes Reply with quote

gerdesj wrote:
Have you tried to connect directly to HAVP without using port redirection?
yep - now solved.
Now I'm wondering whether it is possible to use havp at my client w/o any browser proxy configuration - only using iptables rules.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Mon Jul 05, 2010 9:02 am    Post subject: Re: havp spawn unlimit count of processes Reply with quote

toralf wrote:
gerdesj wrote:
Have you tried to connect directly to HAVP without using port redirection?
yep - now solved.
Now I'm wondering whether it is possible to use havp at my client w/o any browser proxy configuration - only using iptables rules.


Did you have to do anything else apart from remove the port remapping?

You should be able to do transparent proxying. Now as the proxy is on the localhost, you have to allow havp itself out without itself being redirected.

I have not tested this in any way but a bit of a rewrite of the solution here: http://ubuntuforums.org/showthread.php?t=1346350

Code:

iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner --uid-owner havp -j ACCEPT
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080


... might do the trick. Note the --uid owner bit - change that to the user that HAVP runs under.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3809
Location: Hamburg

PostPosted: Mon Jul 05, 2010 9:47 am    Post subject: Reply with quote

yes, replacing it with "$(id -u havp)" did the trick - thx.
:-)
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