How Do I Surf To My Server?
kdk at daleco.biz
Mon Feb 19 13:54:37 UTC 2007
Drew Jenkins wrote:
> 20----- Original Message ----
> From: Chris <racerx at makeworld.com>
> To: Drew Jenkins <drewjenkinsjr at yahoo.com>
> Cc: freebsd-questions at freebsd.org
> Sent: Monday, February 19, 2007 9:09:16 AM
> Subject: Re: How Do I Surf To My Server?
>> If however, you browse from within your own home network, all you need
>> is the IP address of the server (assuming that server has apache or some
>> other httpd) and your done.
> Right, all at home. I have Pound configured (like on my workhorse), not apache.
> But how do I determine the IP address of the server? I've never set that up before.
> What file do I edit?
That depends on "determine". If you mean, "determine" as in,
"discover", then "ifconfig" should work. To *set* the IP address, edit
/etc/rc.conf (adding the correct arguments to ifconfig there) and reboot
the server, or issue the correct arguments to ifconfig in real time (but
you'll have to do it every time you reboot). Perhaps we'll be a tough
schoolmaster here; see ifconfig(1)'s man page for more info ;-)
>> Servers should NEVER be ip'ed dynamically. Servers should ALWAYS be
>> static unless of course, you are running some form of DNS internally.
> All I need is something like this:
> so I can look at said site.
>> Again, if your intent is to access from outside your network - then the
>> above is mute and you need to educate yourself with the whole networking
> I'm glad I can once more dodge that bullet ;)
Will this help?
$ ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::20a:e6ff:fee5:3760%vr0 prefixlen 64 scopeid 0x2
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (100baseTX <full-duplex>)
And on a Windows Laptop:
C:\> more c:\windows\system32\drivers\etc\hosts
# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 188.8.131.52 rhino.acme.com # source server
# 184.108.40.206 x.acme.com # x client host
So, I can browse "webmail.daleco.biz", located on a FreeBSD server on my
LAN, from a Windows laptop; the server is running on the FreeBSD box's
"vr0" interface (IP address 192.168.0.1), and the "hosts" file on the
Winbox is telling it that "webmail.daleco.biz" is at that address.
That's DNS, circa 1981. No charge ;-)
I never vote for anyone. I always vote against.
-- W.C. Fields
More information about the freebsd-questions