aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Better IPTables or IPFilter ?  (Read 4105 times)

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Better IPTables or IPFilter ?
« on: January 27, 2005, 02:38:32 PM »

Hi everybody,

I was just wandering about which one is better.
Actually I can successfully load the bluetack IPFilter list in amule, but I cannot verify if unwanted IPs are really left out. With an IPTables based method instead I can easily see in my messages log that bad IPs are thrown away.
Now, I see IPTables slows my pc down with 50000+ rules...
IPFilter leaves my pc much more resources (and don't kill my browser while going on http://www.hp.com for example).

What is your suggestion ? Shall I go for IPTables or IPFilter ?

Is there a definitive way to check IPFilter effectiveness ?
Log (even the verbose one) is not useful.

Many, many thanks
Fabio
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Better IPTables or IPFilter ?
« Reply #1 on: January 27, 2005, 02:48:52 PM »

Verbose log should contain messes when a IP has been filtered, also, if aMule is letting connections through from IPs that should have been filtered, then it's a bug and it should be fixed.
Logged

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Better IPTables or IPFilter ?
« Reply #2 on: January 27, 2005, 02:54:30 PM »

Is there any particular kind of log I should look at ?


Maybe something similar to... ?

01/26/05 23:44:21: Remote Client: OP_STARTUPLOADREQ
01/26/05 23:44:21: Packet received from 81.XXX.XX.XXX


Or, would you suggest me a typical log I should look at ?

Thanks
Logged

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Better IPTables or IPFilter ?
« Reply #3 on: January 27, 2005, 08:40:14 PM »

Nobody knows a typical log entry I can look for to be sure the filters are working ?

pleeease ?  :)
Logged

geeko

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 132
    • http://geeko.planetaclix.pt
Re: Better IPTables or IPFilter ?
« Reply #4 on: January 27, 2005, 09:03:47 PM »

Chareos,

I've modified my amule to always show filtered ips (at the amule log tab)

I don't know if this can help you or not, but if you want I can post that patch here...

regards,
geeko
« Last Edit: January 27, 2005, 10:08:05 PM by geeko »
Logged

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Better IPTables or IPFilter ?
« Reply #5 on: January 27, 2005, 10:12:50 PM »

Many thanks, geeko !

Right now I'm using a pre-compiled amule (for Slackware) but I could try your patch... or wait for an official version that integrates it, if programmers are willing to...

Would you post your patch, please ?
Thank you again !
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Better IPTables or IPFilter ?
« Reply #6 on: January 27, 2005, 11:34:11 PM »

I dont think that changing the default behavior to display filtered IPs would be a good idea, considering that there can be hundreds if not more of such events in a relative short time (especially if you use the IPFilter to limit foreign traffic), with the result that they will outweight the normal log entires.
Logged

geeko

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 132
    • http://geeko.planetaclix.pt
Re: Better IPTables or IPFilter ?
« Reply #7 on: January 28, 2005, 12:39:03 AM »

Chareos,

Is like Xaignar says...

So before proceeding in applaying this patch is best to backup your previous version, and only to run this modified version for a short period of time because, it might increase significantly your log file or even increase your CPU time... But for now, just use it  to "debug" your IPFilter file, without having that extra output of the verbose mode

despite of that... here it is...

HTH
geeko
« Last Edit: January 28, 2005, 12:47:06 AM by geeko »
Logged

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Better IPTables or IPFilter ?
« Reply #8 on: January 28, 2005, 08:45:51 AM »

I agree with you, Xaignar, but having it hardcoded disabled kills any choice.
Maybe a setting on/off would be enough (and very handful).


Thank you all, I'll try this afternoon !
Fabio
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Better IPTables or IPFilter ?
« Reply #9 on: January 28, 2005, 10:06:06 AM »

That's what the Verbose option is for.
Logged

geeko

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 132
    • http://geeko.planetaclix.pt
Re: Better IPTables or IPFilter ?
« Reply #10 on: January 28, 2005, 02:46:46 PM »

Xaignar,

I agree with you also...

but my ideia was only to prevent a lot of extra information, shown when activating the verbose option(if the purpose is only to verify/check the ipfilter functionality/behavior) and not to break amule's default behavior...

just a thought :)

best regards,
geeko
« Last Edit: January 28, 2005, 03:11:11 PM by geeko »
Logged

Chareos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Better IPTables or IPFilter ?
« Reply #11 on: January 30, 2005, 11:18:06 PM »

No spare time recently to try, so... another question:

Xaignar, what's a typical entry I could look for ? I mean, there's an entry (in verbose mode) that proves me the filter is working ?
Maybe something like "Client 'name' (IP:xx.xxx.xx.xx) caused a socket blocking error. Retries: 0. Trying to reconnect... (retries left: 2)" or anything else... ?


Fabio
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Better IPTables or IPFilter ?
« Reply #12 on: January 31, 2005, 12:04:50 AM »

The actual log-lines will look something like this:
"Filtered IP: ()"
Logged