DNS and internal routing

This is a discussion on DNS and internal routing within the Linux Networking forums, part of the Linux Forums category; Ok, here is my wish: I have a DSL connection with a static IP and a domain name with which ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-11-2006
Scottatron
 
Posts: n/a
Default DNS and internal routing

Ok, here is my wish:

I have a DSL connection with a static IP and a domain name with which I
can edit the DNS entries of.

I have setup an A record and an MX record for home.mydomain.com to
point to my DSL connection's static IP.

On my internal network I have 3 machines. What I would like to be able
to do is create subdomains of home.mydomain.com based on my (ie
internal1.home.mydomain.com, internal2.home.mydomain.com etc..) and
have one of my internal machines receive all incoming traffic and route
traffic to the other internal machines based on the incoming domain
being used.

For example:

internal1.home.mydomain.com recieves all traffic for home.mydomain.com
and subdomains. If I ssh to internal3.home.mydomain.com,
internal1.home.mydomain.com recognises this and routes the traffic
through to internal3.home.mydomain.com

I realise that I can just do this with NAT for specific ports, but
would for the sake of learning, I would also like to learn how to do
this by machine name.

If somebody could point me in the direction of what I should be
learning to acheive this, I would be very appreciative.

Thanks
Scottatron

Reply With Quote
  #2 (permalink)  
Old 02-11-2006
Antoine EMERIT
 
Posts: n/a
Default Re: DNS and internal routing

"Scottatron" <scottatron@gmail.com> écrivait
news:1139650730.511454.219880@g14g2000cwa.googlegr oups.com:

> I realise that I can just do this with NAT for specific ports, but
> would for the sake of learning, I would also like to learn how to do
> this by machine name.


If you have the same IP for all your sub-domain , you can't do that at a
TCP/IP only level. Because the hostname is not send in the TCP/IP
connection.

Except in the upper protocol level. For example, the HTTP protocol send
the request hostname in the http header (fiels HOSTNAME=<domaine or
subdomain requested>).

This is not the case in the ssh protocol. It only open a port (default=
22).

So you can't do that with "simple" routing services. Netfilter can't
solve this problem.

In the case of http, you even have t install a "redirector" (heartbeat,
or squid or apache in proxy mode) that analyse the http header to connect
to the right internal server.


Regards

Reply With Quote
  #3 (permalink)  
Old 02-11-2006
Scottatron
 
Posts: n/a
Default Re: DNS and internal routing

Thanks Antoine

I figured that might be the case.

So am I correct in saying that I could do this if I had more than one
external IP address? And in that case I would use IPTables?

Scott

Reply With Quote
  #4 (permalink)  
Old 03-05-2006
Antoine EMERIT
 
Posts: n/a
Default Re: DNS and internal routing

"Scottatron" <scottatron@gmail.com> écrivait news:1139700715.148701.326280
@o13g2000cwo.googlegroups.com:

> Thanks Antoine
>
> I figured that might be the case.
>
> So am I correct in saying that I could do this if I had more than one
> external IP address? And in that case I would use IPTables?


Yes, you are correct.


Regards
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0