DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th August 2009
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Question Can't ping "$ localhost"

Hi,

$ hostname
lilium.my.domain
On the same box:
$ ping lilium.my.domain
ping: unknown host: lilium.my.domain
( $ping lilium gives the same output)

Is this normal? I have this result on two different OpenBSD computers.

$ talk [name]
talk: lilium.my.domain: Unknown host

This makes me think it is not normal. Shouldn't talk work 'out of the box'? Is it necessary to put the local hostname in /etc/hosts ?
Reply With Quote
  #2   (View Single Post)  
Old 20th August 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,116
Thanked 182 Times in 149 Posts
Default

It very normal

If I comment my hostname out
Code:
::1 localhost.utp.xnet localhost
127.0.0.1 localhost.utp.xnet localhost
::1 hercules.utp.xnet hercules
#127.0.0.1 hercules.utp.xnet hercules
A ping of hercules.utp.xnet generates the following DNS traffic
Code:
tcpdump: listening on re0, link-type EN10MB
21:28:12.805171 192.168.222.20.28847 > 192.168.222.10.53: 59717+ A? hercules.utp.xnet. (35)
21:28:12.806093 192.168.222.10.53 > 192.168.222.20.28847: 59717 1/0/0 A 192.168.222.20 (51)
Because I have a local nameserver at 192.168.222.10, which resolves my hostname, the ping succeeds
Code:
ping -c2 hercules.utp.xnet 
PING hercules.utp.xnet (192.168.222.20): 56 data bytes
64 bytes from 192.168.222.20: icmp_seq=0 ttl=255 time=0.025 ms
64 bytes from 192.168.222.20: icmp_seq=1 ttl=255 time=0.020 ms
--- hercules.utp.xnet ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.020/0.022/0.025/0.005 ms
You probably have no local nameserver for the "my.domain" domain. In those cases you need an entry in "/etc/hosts".

What is the contents of your "/etc/resolv.conf"?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 20th August 2009
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Default

Thanks for the response. Now I have another, slightly more difficult problem.

This in my configuration.

pietje.xs4all.nl (80.101.175.113) === SpeedTouch router === lilium.my.domain (10.0.0.5)

so these are, my external IP adres, my router and my soekris server called lilium =]

I have setup 10.0.0.5 as the "Default Server" in the NAPT configuration of my SpeedTouch router. You can without a problem connect to my server on http, but I cannot make a http connection to my external IP adres (or hostname) from within my LAN.
So, on lilium, I try:
$lynx pietje.xs4all.nl or $lynx 80.101.175.113
lynx outputs:
Making HTTP connection to 80.101.175.113
And that's it.
$ lynx localhost does work without a problem

$ ping 80.101.175.113
PING 80.101.175.113 (80.101.175.113): 56 data bytes
64 bytes from 10.0.0.5: icmp_seq=0 ttl=255 time=1.232 ms

This looks funny.

Is this all normal?:-)
Reply With Quote
  #4   (View Single Post)  
Old 20th August 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,116
Thanked 182 Times in 149 Posts
Default

Yes, that is also quite normal See for a similar situation where pf is used to redirect the explanation in http://openbsd.org/faq/pf/rdr.html#reflect.

From the outside your website works. http://80.101.175.113/geekcode.txt gives
Code:
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS dx s:- a-- C++ UB P+ L++ E- W- N- o K- w 
O M- V- PS PE++ Y PGP+ t 5 X R tv+ b DI- D+ 
G e h! r y+ 
------END GEEK CODE BLOCK------
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 20th August 2009
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Thumbs up

It is just in the pf FAQ! But that was impossible for me to know, because I was only going to use pf when I figured out those issues, which appear not to be an issue.

Thanks.
Reply With Quote
Reply

Tags
localhost, ping, resolv

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opera Port - conflicting pkgs in "make install" IronForge OpenBSD Packages and Ports 5 29th October 2009 05:10 AM
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM
"Thanks" and "Edit Tags". diw Feedback and Suggestions 2 29th March 2009 12:06 AM
Newbie-friendly "printing in OpenBSD" guide wanted Shagbag OpenBSD Packages and Ports 5 7th July 2008 09:26 PM
The Ping Torture of Tantalus" - A Greek tragedy exposing ARP and DNS J65nko Guides 0 6th May 2008 10:44 PM


All times are GMT. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick