View previous topic :: View next topic |
Author |
Message |
tuner23 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 82
|
Posted: Fri Jun 24, 2011 8:44 pm Post subject: [SOLVED] forward different subdomains a fqdn to local hosts |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
gerdesj l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Simpsons/simpsons_homer.gif)
Joined: 29 Sep 2005 Posts: 622 Location: Yeovil, Somerset, UK
|
Posted: Fri Jun 24, 2011 10:06 pm Post subject: Re: forward different subdomains a fqdn to different local h |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tuner23 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 82
|
Posted: Sat Jun 25, 2011 6:13 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23093
|
Posted: Sat Jun 25, 2011 5:22 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tuner23 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Jun 28, 2011 4:05 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|