LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-12-2005, 02:17 AM   #1
Elitist_Phoenix
LQ Newbie
 
Registered: Nov 2005
Location: Australia
Distribution: Ubuntu and Slackware
Posts: 4

Rep: Reputation: 0
/etc/hosts slows networking on Ubuntu 5.10


I'm using a hosts file for ad blocking however this big (2.5mb uncompressed) file seems to lag and slow down the system with anything to do with the internet. It will even lag the network control panel and will stop the modem from dialing on startup. Is there anyway to stop this?

Also is there anyway to manually flush the DNS cache?
 
Old 11-12-2005, 04:38 AM   #2
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 771

Rep: Reputation: 32
I think you may be going about this in a suboptimal way.

A 2.5 MB hosts file is not something common! It's definitely going to slow you down.

I'd suggest using ad blocking in the browser.

Switch to Firefox, if you haven't already done so, and download the adblock plugin.

Then when you want to block an ad, replace most of the url - the long bit after the main address - with a * to block all other ads from the same source.

Flash ads are a little more difficult, you'll need to look at the list of blockable items and work out which ones are the ads.

Don't forget to delete or drastically reduce the hosts file.

I don't know about flushing the DNS cache, sorry.
 
Old 11-12-2005, 05:04 AM   #3
Elitist_Phoenix
LQ Newbie
 
Registered: Nov 2005
Location: Australia
Distribution: Ubuntu and Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
The hosts file works for opera, thunderbird, evolution to. It also acts as a way to block ads to the rest of the lan, which is using it as a NAT box. And yeah I do realise 2.5mb is a bit uncommon but hell, IT WORKS okay on windohs which makes it scary that linux doesn't!
 
Old 11-12-2005, 12:02 PM   #4
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 771

Rep: Reputation: 32
Quote:
IT WORKS okay on windohs which makes it scary that linux doesn't!
Well, it works on Linux too but is slowing you down, possibly because linux reads it more often.

In your shoes I'd try and set up a ramdisc, copy hosts to it and replace /etc/hosts by a symlink to the new hosts file. See if this speeds things up.

I gave up on filtering on the gateway, especially when I converted the whole house to firefox - 5 people, each with different surfing habits.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 04:51 PM
Networking with Windows (Hmmmm) and Ubuntu Linoman Ubuntu 4 11-06-2005 10:26 AM
hosts.allow & hosts.deny question... jonc Linux - Security 9 03-05-2005 10:41 PM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 04:52 PM
hosts.deny and hosts.allow defaults? gui10 Linux - Security 5 12-20-2001 02:57 AM


All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration