View previous topic :: View next topic |
Author |
Message |
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 7:51 pm Post subject: hosts file |
|
|
Hi i edited my host file but i need gentoo to reload it without rebooting how do i do that |
|
Back to top |
|
|
Crisis l33t
Joined: 10 Feb 2003 Posts: 613 Location: Portland, OR
|
Posted: Tue Jun 21, 2005 7:53 pm Post subject: |
|
|
All changes will take effect as soon as you save the file, no restarting of any services needs to be done. |
|
Back to top |
|
|
Lajasha Veteran
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Tue Jun 21, 2005 7:53 pm Post subject: |
|
|
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 |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 7:56 pm Post subject: |
|
|
but the hosts file is still used if i use iptable and using gentoo as a router |
|
Back to top |
|
|
Lajasha Veteran
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Tue Jun 21, 2005 7:58 pm Post subject: |
|
|
yes the gentoo router would use the definitions that you have in there. _________________ Come and play in my land |
|
Back to top |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 8:00 pm Post subject: |
|
|
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 |
|
|
Lajasha Veteran
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Tue Jun 21, 2005 8:05 pm Post subject: |
|
|
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 |
|
|
Crisis l33t
Joined: 10 Feb 2003 Posts: 613 Location: Portland, OR
|
Posted: Tue Jun 21, 2005 8:05 pm Post subject: |
|
|
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 |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 8:11 pm Post subject: |
|
|
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 |
|
|
Crisis l33t
Joined: 10 Feb 2003 Posts: 613 Location: Portland, OR
|
Posted: Tue Jun 21, 2005 8:18 pm Post subject: |
|
|
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 |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 8:48 pm Post subject: |
|
|
as it seems the hosts file isent used when routing |
|
Back to top |
|
|
Lajasha Veteran
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Tue Jun 21, 2005 8:53 pm Post subject: |
|
|
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 |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 8:57 pm Post subject: |
|
|
damm |
|
Back to top |
|
|
zonk Apprentice
Joined: 23 May 2005 Posts: 176
|
Posted: Tue Jun 21, 2005 9:01 pm Post subject: |
|
|
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 |
|
|
Hun73r n00b
Joined: 28 Jun 2004 Posts: 49
|
Posted: Tue Jun 21, 2005 10:25 pm Post subject: |
|
|
I dont want to add about 3000 ips to iptables thats why i use hosts from
hxxp://hostsfile.mine.nu |
|
Back to top |
|
|
Crisis l33t
Joined: 10 Feb 2003 Posts: 613 Location: Portland, OR
|
Posted: Wed Jun 22, 2005 1:15 pm Post subject: |
|
|
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 |
|
|
|