Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hosts file
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
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 7:51 pm    Post subject: hosts file Reply with quote

Hi i edited my host file but i need gentoo to reload it without rebooting how do i do that :?
Back to top
View user's profile Send private message
Crisis
l33t
l33t


Joined: 10 Feb 2003
Posts: 613
Location: Portland, OR

PostPosted: Tue Jun 21, 2005 7:53 pm    Post subject: Reply with quote

All changes will take effect as soon as you save the file, no restarting of any services needs to be done.
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jun 21, 2005 7:53 pm    Post subject: Reply with quote

I thought once you updated it, it was in use. You could try to restart the internet connection too.
_________________
Come and play in my land
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 7:56 pm    Post subject: Reply with quote

but the hosts file is still used if i use iptable and using gentoo as a router
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jun 21, 2005 7:58 pm    Post subject: Reply with quote

yes the gentoo router would use the definitions that you have in there.
_________________
Come and play in my land
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 8:00 pm    Post subject: Reply with quote

hmm damm its still not working

i put this in host file and meny more

127.0.0.1 ct.cydoor.com
127.0.0.1 cydoor.com

but can still go to those sites
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jun 21, 2005 8:05 pm    Post subject: Reply with quote

well for one I think you have to do it like this
Code:
127.0.0.1 ct.cydoor.com cydoor.com
and is the issue that it is or is not resolving?
_________________
Come and play in my land
Back to top
View user's profile Send private message
Crisis
l33t
l33t


Joined: 10 Feb 2003
Posts: 613
Location: Portland, OR

PostPosted: Tue Jun 21, 2005 8:05 pm    Post subject: Reply with quote

If you are trying to block those sites and are using iptables, why not just write a basic rule to drop packets etc, rather then try to trick it about the ip?
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 8:11 pm    Post subject: Reply with quote

I have not been working with iptables much so i dont know howto block those sites whit it

and the hosts file was an easy on to go for


If i ping cydoor from ssh at my box it says

PING www.cydoor.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.163 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.137 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.124 ms


and from windows

Pinging www.cydoor.com [209.11.67.25] with 32 bytes of data

Reply from 209.11.67.25: bytes=32 time=118ms TTL=242
Reply from 209.11.67.25: bytes=32 time=134ms TTL=242
Reply from 209.11.67.25: bytes=32 time=225ms TTL=242
Reply from 209.11.67.25: bytes=32 time=121ms TTL=242

dont understand it...
Back to top
View user's profile Send private message
Crisis
l33t
l33t


Joined: 10 Feb 2003
Posts: 613
Location: Portland, OR

PostPosted: Tue Jun 21, 2005 8:18 pm    Post subject: Reply with quote

if you want an "easy" way to block sites with iptables, I suggest checking out shorewall, which allows you to just put all the ips in a blacklist file for easy blocking...

Or you could look up the drop syntax to manually feed to iptables, it isn't too hard either.
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 8:48 pm    Post subject: Reply with quote

as it seems the hosts file isent used when routing :(
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jun 21, 2005 8:53 pm    Post subject: Reply with quote

actualy i think that there is an order in which it checks, normal i believe is DNS then hosts. so since it can find it on the dns it does not bother looking to the host file. Not sure where this is set though.
_________________
Come and play in my land
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 8:57 pm    Post subject: Reply with quote

damm :(
Back to top
View user's profile Send private message
zonk
Apprentice
Apprentice


Joined: 23 May 2005
Posts: 176

PostPosted: Tue Jun 21, 2005 9:01 pm    Post subject: Reply with quote

why don't you just look up a basic iptables tutorial and use that? i mean, you are running it anyways. what good is a firewall if you don't even use it?
Back to top
View user's profile Send private message
Hun73r
n00b
n00b


Joined: 28 Jun 2004
Posts: 49

PostPosted: Tue Jun 21, 2005 10:25 pm    Post subject: Reply with quote

I dont want to add about 3000 ips to iptables thats why i use hosts from



hxxp://hostsfile.mine.nu
Back to top
View user's profile Send private message
Crisis
l33t
l33t


Joined: 10 Feb 2003
Posts: 613
Location: Portland, OR

PostPosted: Wed Jun 22, 2005 1:15 pm    Post subject: Reply with quote

Code:
I dont want to add about 3000 ips to iptables thats why i use hosts from


Then emerge shorewall and toss them all in the blacklist file. It's as easy to adding them to hosts, and shorewall will automatically toss in the iptables rules for you for each IP. (You can also specify /16 /24 etc for larger blocks.)
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