Re: hosts file

From: Ron Goulard (foz_at_techville.org)
Date: 05/09/04

  • Next message: Michael: "mouse/keyboard hangs with FC1 on Dell Inspiron 7500"
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    Date: Sun, 09 May 2004 03:45:34 -0400
    
    

    On Fri, 2004-05-07 at 11:40, Jay Daniels wrote:
    > I purchased a domain and setup a roundrobin service to host my DSN.
    >
    > Since X would not start because the dns has not propagated yet, I put
    > my FQDN in /etc/hosts
    >
    > # cat /etc/hosts
    > # Do not remove the following line, or various programs
    > # that require network functionality will fail.
    > 127.0.0.1 localhost.localdomain localhost
    > 192.168.2.1 darkforce.darkforceteam.net darkforce
    > 192.168.2.12 darkstar.darkforceteam.net darkstar
    >
    >
    >
    > Something tells me that perhaps I have something incorrect? I have
    > two interface and am masquerading as darkforce.darkforceteam.net with
    > a static ip on eth0. The eth1 is my localnet.
    >
    > Should I have pointed my FQDN to my static ip or the 192.168...?
    >
    > As it is, everything works even though my ip doesn't resolve yet. But
    > is this correct?

    Looks ok to me if it's a desktop box. The only thing that I would
    caution about is that if this is a laptop and you take it someplace
    other than your internal net, it won't resolve those addresses properly.

    > There was a tool in RH 9 to set the hostname, I cannot find this tool
    > in Fedora??? so I edited /etc/sysconfig/network and /etc/hosts by
    > hand.

    I've always done it by hand like that, then set it at the CLI. Upon the
    next reboot, it's all taken care of.

    > I want to be able to access this host by name http://darkforce/ from
    > the localnet even if the network is down.

    Yup. Should be fine unless the internal net is down. But then, there's
    other probs anyway :)

    > I am also clueless as to what to put in redhat-config-httpd? I want
    > the default to be www. but my machine is named darkforce.domain...
    > How do I add ssh.domain.net ftp.domain.net etc to my hosts file?

    Since you're doing NAT, set the external interface to forward port 80
    (and 443 if you like) to the machine that is doing the web serving.

    I'm not sure if you want to have machines called ssh and ftp, or you
    want to forward those services to certain internal machines.

    I'll continue here based on the assumption that you have only one
    external IP (for example a home broadband connection - your firewall)
    and wish to run all these services (web, ssh, ftp) through that one IP
    to internal machines (or even elsewhere on the net if you like).

    Easiest would be to forward traffic for ftp, web, ssh, mail, whatever
    ports, from the ext iface to the internal machine(s) you want the
    services run on (iptables is your friend here) and simply set CNAME
    aliases in dns for those services, pointing to your external IP.

    For ssh, don't do anything in dns. I would just forward the port to the
    machine you want, this way you could type for example:

    ssh user@www.domain.net.

    I don't know how much traffic you figure on getting/sending, but I do
    remember reading somewhere that NAT will max out at about 3-4M
    bytes/second (2 nic's on a 66Mhz pci bus) or something close to that.
    It may be wrong, it's just something which I read.

    > Searched google but everybodies hosts file seems to be setup
    > differently.
    >
    > What else do I need to do to get apache working and add virtual host
    > like testsite.mydomain.net?

    Read through /etc/httpd/conf/httpd.conf. There's a fairly well
    documented section in there for virtual hosts.

    Set the servername directive in httpd.conf to www.domain.net and that
    should be it, though if you're using vhosts, you may need to leave
    that. It's been a long time since I've done vhosts, so I'm really not
    clear there anymore.

    Ron

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Michael: "mouse/keyboard hangs with FC1 on Dell Inspiron 7500"

    Relevant Pages

    • Re: SSH: remote login returns "invalid user"
      ... host mail.harlley-consultants.com ... server rather than web server? ... If they have the right server software running (mail, web, ssh daemon) then that software picks up the request. ... When you want to send mail to xxx@xxxxxxxxxxxxxxxxxxxxxxx, your mail server looks up the MX record for hartley-consultants and sends it to port 25 on the machine pointed to. ...
      (Debian-User)
    • Re: Port Forwarding
      ... I'm using SecureCRT 5.2.1 and i want to make ssh tunnel to access some ... I have to access Host 2, but to get to host 2 i have to first access ... Is there a way of doing it on SecureCRT? ... pick a port to use locally. ...
      (comp.security.ssh)
    • Re: [opensuse] A question about errors in logs
      ... if they are hit me on Mail, ssh, and ftp. ... then duplicate the ssh entries on whatever port you choose ... RESTART SSH IF YOU ARE WORKING FROM A REMOTE HOST OR YOU ARE --- SCREWED!!! ...
      (SuSE)
    • Re: Dynamic ip and ftp
      ... i do not have a router that support ddns but using dynamic ... update client software to map public ip to host name. ... have a router that supports Port Address Mapping & Dynamic DNS.You ... internal FTP Server's IP Address for FTP. ...
      (microsoft.public.windows.server.general)
    • Re: [opensuse] A question about errors in logs
      ... if they are hit me on Mail, ssh, and ftp. ... then duplicate the ssh entries on whatever port you choose ... RESTART SSH IF YOU ARE WORKING FROM A REMOTE HOST OR YOU ARE --- SCREWED!!! ...
      (SuSE)