Announcement

Collapse
No announcement yet.

How to bind name to specific IP address on multi-homed system

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to bind name to specific IP address on multi-homed system

    Hello All,

    I am running a Kubuntu Feisty system with 2 network cards:
    eth0: static IP address for internal network
    eth1: dynamic address connected to cable modem

    I use Firestarter for internet connection sharing, and it is working. Workstations can connect to the Internet, and they can connect to services on the server by using its internal address.

    My problem is that I cannot ping the server by name (machine-name.local) from other machines, because the server's name is bound to the cable modem's network, and not the local 192.168.0.* network. I suppose that I could work around this by editing the workstations' host files (there are only a few), but is there a way to bind machine-name.local to the internal network, and some other name to the external address?

    I am using my ISP's name server.

    Thanks for any assistance.

    #2
    Re: How to bind name to specific IP address on multi-homed system

    Not at all sure I'm catching your drift -
    but my (virtual) file server I can "ping"

    - locally by it's internal name
    - remote by it's public name

    as follows:

    Code:
    USER # ping MAHAB
    PING MAHAB (192.168.110.2) [...]
    USER # ping mahab.dyndns.org
    PING mahab.dyndns.org (81.62.142.61) [...]
    If this is what you're looking for, I'll be glad to share my solution

    Comment


      #3
      Re: How to bind name to specific IP address on multi-homed system



      This is not quite it. At some point I suppose that I will create a DynDNS account. It's something that I have done before.

      My situation is:
      Machine name: server1
      eth0: 192.168.0.1 (LAN)
      eth1: 72.x.x.x (Cable modem)

      On any machine, I must add .local to the name, otherwise ping returns 127.0.0.1, but that is not a problem. When I sit at server1, I get the following:

      ping station2.local -> 192.168.0.2 (as expected)
      ping server1.local -> 72.x.x.x

      When I sit at station2:
      ping station2.local -> 192.168.0.2
      ping server1.local -> unknown host server1.local
      ping 192.168.0.1 -> replies as expected

      I want:
      ping server1.local -> 192.168.0.1
      which I can achieve by making an entry in /etc/hosts on each machine. I was just thinking that if I could make "ping server1.local" return 192.168.0.1 while sittinig at server1, it would be a global solution, and I would not have to edit any host files.


      Comment


        #4
        Re: How to bind name to specific IP address on multi-homed system

        Originally posted by johnbrown105
        I want
        ... to either adapt the host(s) files or setup a local name server, I'd guess (not: know).

        Comment


          #5
          Re: How to bind name to specific IP address on multi-homed system

          Originally posted by UnicornRider
          Originally posted by johnbrown105
          I want
          ... to either adapt the host(s) files or setup a local name server, I'd guess (not: know).
          That is probably what I will have to do in the end. Thanks.

          Comment

          Working...
          X