Author Topic: domainname/public ip issue internally  (Read 2174 times)

dssdss

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
domainname/public ip issue internally
« on: April 29, 2013, 01:29:36 am »
I have a web server that is a chat server and it resides on another server.

The redirect from the outside world (domain.com:1234)  connects to the web server correctly but the index.html has a script and this times out because internally it can not lookup domain.com

<script language="javascript" src="http://domain.com:1234/client/chat.js"></script>
<script language="javascript">
openSWF("http://domain.com:1234/client/chat.swf?init_host_s=192.168.1.100&init_host_h=192.168.1.100", "1079", "680" );

I have tried changing domain.com to internal ip address of the server and does not work
I have tried adding domain.com and external and internal IP to hosts file and does not work
I have tried changing domain.com to public IP and does not work
I added Hostname and External and Internal IP address in dns module and does not work

How can I configure the firewall so that internally it can resolve domain.com?

thank you

christian

  • Guest
Re: domainname/public ip issue internally
« Reply #1 on: April 29, 2013, 04:31:22 am »
How can I configure the firewall so that internally it can resolve domain.com?

Reading your post, my first react is to say:
why do you want FW to resolve this?  ::)

If this runs client side, it has to be resolved client side, if it runs (internal) server side, it will be resolved by internal server. I can't see FW involved at least in the name solving step.

This said, I don't understand what domain.com is  :-[
Is it your external domain name ?

dssdss

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: domainname/public ip issue internally
« Reply #2 on: April 29, 2013, 03:35:46 pm »
domain.com is external domain name (not my real domain name, I just changed my real domain name to domain.com for this discussion)

Zentyal is acting as router/firewall/ etc,  Zentyal was also setup as domain.com  (not sure if this is the issue)

eth0 is the external nic - has static IP and only modem in front of it ( no other router) I have no blocked ports from my ISP
eth1 is the internal nic - has static IP for local lan

The chat server resides on another internal server

If I change domain.com to the lan ip of the chat server in index.html. I can only access the chat on the lan side and everything works as expected but this does not work coming from outside world because it doesn't know what 192.168.1.100 is

If I leave as is (domain.com) in index.html, chat stops working in the internal lan because it cannot resolve domain.com and times out ( cannot ping domain.com internally). External wan gets redirected to the correct chat server but hangs here because internally cannot resolve domain.com

If I replace Zentyal with my original linksys router everything works as expected for the Chat server (internal and external)





christian

  • Guest
Re: domainname/public ip issue internally
« Reply #3 on: April 29, 2013, 03:52:13 pm »
Much clearer  ;)
So it looks like you (Zentyal) DNS is not configured for this purpose.
I assume that Zentyal is your DNS for internal clients and servers too.

the short answer is "configure Zentyal DNS by setting an IP for domain.com domain"

The longer and controversial answer is:
"this is the side effect of using web service not using FQDN"  :P
If you had configured everything with FQDN, you would not face such issue.
If your DNS doesn't contain entry to resolve requests that are not built with host.domain or service.domain but only "domain" then it will not work.

So one option is to add such entry (Zentyal DNS permits it) or to run your application as "real" service, something like chat.domain.com, e.g., so that you can add it as A record (host) or CNAME (alias) in DNS.
You may have to do the same with external DNS if you want to keep some consistency.

If my analysis is correct, then it has nothing to do with FW but DNS instead.

dssdss

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: domainname/public ip issue internally
« Reply #4 on: April 29, 2013, 07:05:33 pm »
Thank you for the response

If you mean in the DNS module under Domain IP address when you say "the short answer is "configure Zentyal DNS by setting an IP for domain.com domain""

I have already tried that and still same issue, does not work. I have tried adding the local and external IP in there.

christian

  • Guest
Re: domainname/public ip issue internally
« Reply #5 on: April 29, 2013, 08:01:29 pm »
1 - what is your Zentyal version?
2 - are all your devices using Zentyal as DNS?

dssdss

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Solved Re: domainname/public ip issue internally
« Reply #6 on: May 03, 2013, 07:11:45 pm »
I feel like an idiot.

It was my fault for over looking something.

I forget to open 1 port on the firewall for the chat server.

All is good with my original configuration.

Thank you for your help