FOOD FOR THOUGHT can connect via IP not hostname

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
Why can I connect to the server via IP but not the hostname which resolves to the hostname?

This is a fresh install only using IPTables and I probably didn't put the right rules in

What would the command be to make IPTables let my traffic in via hostname not just IP?
 

howardsl2

Guru
Joined
Aug 5, 2013
Messages
88
Reaction score
25
Are you connecting to the SIP port 5060, or connecting to port 80/443 on the server?

Generally if a hostname resolves to your server's IP, then either one can be used to connect. I don't quite understand your issue here.
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
I don't understand either.
I'm trying to connect to port 5060 with Zoiper which has worked before thru hostname.
I can access the control panels via the hostname, but have to use the IP to get a sip phone to register.
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
using hostname (UNC) requires DNS to be configured correctly. It also requires the client to be using a DNS server that "knows" the relationship of hostname to IP. Then there is the matter of just hostname vs fully qualified domain name (FQDN).
Without knowing the particulars of your setup, it's near impossible to get to the correct answer. It would be more like throwing darts at a target until one hits.
useful bits of information would be:
a) how DNS is configured server side for your host.
b) how DNS is configured client side.
c) are you using simple hostname or fqdn?
d) is your client software DNS aware?
e) do you have a hosts file configured?
f) is the client aware of the hosts file?
are your tests from a client consistent? for instance, when you say you can access the control panels via hostname but not with a sip phone, is this the same client? or two separate devices?

I will disregard for the moment the iptables configuration until you have the DNS sorted first. Without working DNS, iptables will only complicate the issue (if you are using hostnames instead of IP that is)
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
using hostname (UNC) requires DNS to be configured correctly. It also requires the client to be using a DNS server that "knows" the relationship of hostname to IP. Then there is the matter of just hostname vs fully qualified domain name (FQDN).
Without knowing the particulars of your setup, it's near impossible to get to the correct answer. It would be more like throwing darts at a target until one hits.
useful bits of information would be:
a) how DNS is configured server side for your host.
b) how DNS is configured client side.
c) are you using simple hostname or fqdn?
d) is your client software DNS aware?
e) do you have a hosts file configured?
f) is the client aware of the hosts file?
are your tests from a client consistent? for instance, when you say you can access the control panels via hostname but not with a sip phone, is this the same client? or two separate devices?

I will disregard for the moment the iptables configuration until you have the DNS sorted first. Without working DNS, iptables will only complicate the issue (if you are using hostnames instead of IP that is)



a) how DNS is configured server side for your host.
Cloudflare is handling the DNS and the FQDN resolves to the correct IP
I have also whitelisted Cloudflares IPs https://www.cloudflare.com/ips-v4
b) how DNS is configured client side.
Client side is an Android phone that gets it's DNS from the router.
It can no longer navigate to the control panel via FQDN
c) are you using simple hostname or fqdn?
FQDN
d) is your client software DNS aware?
Yes
e) do you have a hosts file configured?
NO! I'm adding IP FQDN and rebooting
f) is the client aware of the hosts file?
are your tests from a client consistent? for instance, when you say you can access the control panels via hostname but not with a sip phone, is this the same client? or two separate devices?


Due to the fact that I can no longer navigate to the web based control panel via FQDN but I can ping it from my network I would say it should narrow down the causes.

One problem, I am very not familiar with administering IPTables.
I'm used to using cpanel / whm and CSF

I rebooted and realized that only phone seems to be having the issue because Kayako can login from same network using FQDN
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
I changed my router's DNS to 8.8.8.8 and 8.8.4.4 and the problem went away.
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
Are you connecting to the SIP port 5060, or connecting to port 80/443 on the server?

Generally if a hostname resolves to your server's IP, then either one can be used to connect. I don't quite understand your issue here.

I will give it a try.

Got Incredible PBX 11.15.0 for Ubuntu 14 working with Asterisk 11.16.o and FreePBX 2.11.0.34 thanks to Ward Mundy's post...
http://nerdvittles.com/?p=9713
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
One thing that is not working is the operator control panel
Will make seperate post about it.
 

howardsl2

Guru
Joined
Aug 5, 2013
Messages
88
Reaction score
25
If your hostname is configured in Cloudflare DNS with an orange cloud, then it will resolve to one of the CF servers, which is normal because that is the way they proxy your website.

However, in order to let your VoIP client connect, you must make a separate hostname in CF DNS, point it to your server IP, and set that hostname to "grey cloud", which means it will resolve to your server's IP instead of CF's.

To sum it up, in CF orange cloud is only for web traffic on ports e.g. 80/443. Use a separate hostname with grey cloud for other ports.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top