spambuster@users.toughguy.net (Jesper) writes:
>> > Da lookupd's interaktive mode giver det rette, undrer det mig meget at
>> > host kommandoen fejler.. ARGH Apple!
[...]
> Vil det sige det er umuligt at bruge en Hosts fil i Pantheren, no wonder
> det aldrig er lykkes at få til at fungere for mig!
Her virker /etc/hosts helt som forventet (af en unix).
Kommandoen host(1) er lavet til at slå op i DNS og finder derfor
selvfølgelig ikke maskiner defineret andre steder. I det følgende er
maskinen soekris.hacking.dk tilføjet til /etc/hosts og ikke andre
steder og det virker tilsyneladende fint.
Peter-Makholms-Computer
petermakholm$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
10.0.0.3 soekris.hacking.dk
::1 localhost
Peter-Makholms-Computer
petermakholm$ host soekris.hacking.dk
Host soekris.hacking.dk not found: 3(NXDOMAIN)
Peter-Makholms-Computer
petermakholm$ ping -c 1 soekris.hacking.dk
PING soekris.hacking.dk (10.0.0.3): 56 data bytes
64 bytes from 10.0.0.3: icmp_seq=0 ttl=64 time=9.57 ms
--- soekris.hacking.dk ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 9.57/9.57/9.57 ms
Peter-Makholms-Computer
petermakholm$ lookupd -d
lookupd version 324.6 (root 2004.06.10 23:35:03 UTC)
Enter command name, "help", or "quit" to exit
> hostWithName: soekris.hacking.dk
Dictionary: "FF: host soekris.hacking.dk"
_lookup_agent: FFAgent
_lookup_validation: /etc/hosts 1093333521
ip_address: 10.0.0.3
name: soekris.hacking.dk
+ Category: host
+ Time to live: 43200
+ Age: 0 (expires in 43200 seconds)
+ Negative: No
+ Cache hits: 0
+ Retain count: 3
> q
Peter-Makholms-Computer
petermakholm$
--
Peter Makholm | One thing you do is prevent good software from
peter@makholm.net | being written. Who can afford to do professional
http://hacking.dk | work for nothing?
| -- Bill Gates