Find the answer to your Linux question:
Results 1 to 10 of 10
Basically, I have a LAN setup with several computers on it. I have a domain - for example, domain.com. Now, I want to be able to ssh or ftp into ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    17

    Intranet - DNS Server


    Basically, I have a LAN setup with several computers on it. I have a domain - for example, domain.com. Now, I want to be able to ssh or ftp into any computer on the network from outside. I want to do this by going to a subdomain - comp1.domain.com, comp2.domain.com, etc. I have windows XP and ubuntu computers on my network.

    Looking online, I found instructions on making a computer running Windows Server 2003 into a DNS server. (Creating an Internal DNS Server Tutorial (Windows Server 2003)) However, lacking windows server, I was hoping to find a way to do this on windows XP or linux. Does anybody know how to do this?

    --Brian Levinstein

  2. #2
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    simple way you can edit hosts file.
    - linux - /etc/hosts
    - windows - c://windows/system32/drivers/etc/hosts

    Hard way is to setup linux dns server using bind & few hints are :
    - /etc/named.conf - create zone
    - /var/named/master or /var/lib/named/master
    - /etc/resolv.conf

  3. #3
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    bind is the linux dns server.

    but you said you want to access by name all the machines from the outside. This means you need to have your domain.com registered on the internet and subdomains reachable from anywhere on the internet. so workstation1.domain.com would need to be world resolvable. I doubt thats what you really want. an internal dns would allow you to resolve any internal machines internally and bind would certainly work

  4. #4
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Yep! to access from outside, sure need DNS Server

  5. #5
    Just Joined!
    Join Date
    Nov 2006
    Posts
    17
    Hmm - ok. I thought, if I had DNS for the domain redirected to my network, I could then redirect subdomains from there.

    So, here's my problem. I want to access computers on my home network. I know the ip address of my network, and I have also made a subdomain of a website I administrate redirect to my network for ease of use. I know the local ip address of every computer on the network. I would like to be able to ssh/ftp into different computers on the network. A quick and dirty way would be to have each computer host ssh and ftp on a different port, and just have the port forwarding settings do all the work, but that's not easy, scalable, or elegant, and I usually have multiple OS'es (windows xp and/or vista and one or more linux distros) on each computer, so for each computer I'll be doing a lot of setting up.

    Basically, is there any easy way to do this?

    Thanks for your help,
    Brian Levinstein

  6. #6
    Linux Enthusiast
    Join Date
    Jul 2005
    Location
    Maryland
    Posts
    522
    Quote Originally Posted by bmad6 View Post
    So, here's my problem. I want to access computers on my home network. I know the ip address of my network, and I have also made a subdomain of a website I administrate redirect to my network for ease of use. I know the local ip address of every computer on the network. I would like to be able to ssh/ftp into different computers on the network.
    Try adding all the IPs and hostnames of the remote machines
    to /etc/hosts file (on the machine from which you are connecting).

  7. #7
    Just Joined!
    Join Date
    Nov 2006
    Posts
    17
    Quote Originally Posted by pavlo_7 View Post
    Try adding all the IPs and hostnames of the remote machines
    to /etc/hosts file (on the machine from which you are connecting).
    How would I do that? How, for example, would i send "pc1.domain.com" to "72.230.45.12" (random IP) and THEN to "192.168.1.220" on the local network there? The network mask is 255.255.255.0, so would it be something like 72.230.45.12\220?

    The /etc/hosts file can do automatically what I can already do manually, but I don't know how to do this at all.

    --Brian Levinstein

  8. #8
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    For example if ssh, I suggest :

    Client ---> | Internet | --> Modem / Router --> Server --> Remote Host

    So when you make connection from outside to pci.domain.com/72.230.45.12tru port 22, you will automatically connect to the server let say (192.168.1.110). Then, from the server, you able to make another connection to any remote host (Linux / windows Host)

    /etc/hosts actually just to resolve hosts name of your machine. Let say your target host called "node11", just add into all your LAN machine /etc/hosts:

    #/etc/hosts SERVER(192.168.0.110)
    192.168.0.110 server.domain.com server
    192.168.0.220 node11.domain.com node11
    192.168.0.440 node22.domain.com node22

    Same if you want to FTP, rdesktop & etc. Make a connection to the server 1st, only then connect to any target hosts.

  9. #9
    Linux Enthusiast
    Join Date
    Jul 2005
    Location
    Maryland
    Posts
    522
    If you had VPN Gateway/Firewall at home, then you could VPN to home network, and remotely connect to computers on the LAN using their IP or hostnames.

  10. #10
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    A quick and dirty way would be to have each computer host ssh and ftp on a different port, and just have the port forwarding settings do all the work, but that's not easy, scalable, or elegant
    That's the way you will have to do it, since the internal
    addresses of the computers on your lan are not resolvable
    out on the net even if you had a name server reachable
    from the net. You simply don't have enough addresses.
    Use NAT and port forwarding.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •