Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] forward different subdomains a fqdn to local hosts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Fri Jun 24, 2011 8:44 pm    Post subject: [SOLVED] forward different subdomains a fqdn to local hosts Reply with quote

Hy,

i have a dyndns domain and want to forward different subdomains to different local hosts.

i have bind installed with a mydomain.dyndns.org-zone, but resolving/forwarding local
sub1.mydomain.dyndns.org to 192.168.123.1
sub2.mydomain.dyndns.org to 192.168.123.2
does not seem to work.

i thought of using iptables, but i dont want to handle every domain on the firewall.

What is the best way to manage this?



Greets,
Antonios.


Last edited by tuner23 on Mon Jun 27, 2011 12:15 pm; edited 4 times in total
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 622
Location: Yeovil, Somerset, UK

PostPosted: Fri Jun 24, 2011 10:06 pm    Post subject: Re: forward different subdomains a fqdn to different local h Reply with quote

Antonius

You have an internal BIND serving the parent domain and want requests for two sub zones to go to two other name servers.

You need glue and delegation records.

That should give you the key terms to search for ...

Cheers
Jon
Back to top
View user's profile Send private message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Sat Jun 25, 2011 6:13 am    Post subject: Reply with quote

Ah,
okay thank you..

This works now inside my DMZ.


But what should i do wiht my firewall?
The dyndns-domain resolves myhost.dyndns.org and all subdomains (*.myhost.dyndns.org) to the same extrenal ip.

I have activated portforwarding on my fritzbox and it resolv this to my firewall..

uhm, and then?
Can't i resolve the name on my host another time and redirect the destination based on the subdomain?

I think delegation for this problem did not work at all..
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23093

PostPosted: Sat Jun 25, 2011 5:22 pm    Post subject: Reply with quote

tuner23 wrote:
The dyndns-domain resolves myhost.dyndns.org and all subdomains (*.myhost.dyndns.org) to the same extrenal ip.
Do not do that. If you want to use port forwarding only, then each served name must have a unique IP:port pair. Since most people assume port 80 for http, that usually means you need unique IPs for each NAT-hidden machine. This is why NAT causes trouble for people who manage servers.
tuner23 wrote:
Can't i resolve the name on my host another time and redirect the destination based on the subdomain?
At the time port forwarding is processed, there is no concept of a name. IP packets are routed based on IP address, not on names. You could use an HTTP reverse proxy to receive all connections to one machine, then have it instantiate new TCP connections to the hidden machines based on the value of the Host header passed by the client.
Back to top
View user's profile Send private message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Tue Jun 28, 2011 4:05 pm    Post subject: Reply with quote

Hello Hu,

thanks for your reply.

I will use a Web-Proxy (apache or squid).

But i wondered, that there is no solution on basis of dns for this.
On the other side its logical, that you need an application-service to do that...

maybe it gets better on ipv6^^


greets,
Toni.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum