PDA

View Full Version : [ubuntu] Config of my ubuntu server



seizart
December 16th, 2010, 06:05 PM
Hello

I have a domain name which point to my static public ip adress, my ubuntu is behind a dlink router.

I would like to config my ubuntu server so that my server is accessible from outside my local network but ALSO from inside my local network with my domain name.

I manage to access from outside by port forwarding in my router but i can t access my server through my domain name inside my local network, only via the local ip adress (192.168.0.etc..) which i don t want.

I know my question is really specific and it might take somebody who has some network knowledge but i would like to get some help since i looking for a solution for months ....

Hope evrything is clear.

Thanks a lot:D

stlsaint
December 16th, 2010, 07:58 PM
What do you mean when you say "You are unable to access the domain from within the local network?" If you have port forwarding setup and you can access from outside lan than you must be able to access within lan!!
Are you saying that when you are on LAN you are unable to go to:
www.mydomain.com and reach your site?
If so than you need to:
1. Ensure that your domain provider is using the correct public ip address.
2. Ensure that you have apache up and running on website.

karlson
December 16th, 2010, 08:11 PM
Hello

I have a domain name which point to my static public ip adress, my ubuntu is behind a dlink router.

I would like to config my ubuntu server so that my server is accessible from outside my local network but ALSO from inside my local network with my domain name.

I manage to access from outside by port forwarding in my router but i can t access my server through my domain name inside my local network, only via the local ip adress (192.168.0.etc..) which i don t want.

I know my question is really specific and it might take somebody who has some network knowledge but i would like to get some help since i looking for a solution for months ....

Hope evrything is clear.

Thanks a lot:D

If you have DNS server in your network set the A record to your server's IP address.

If you don't then put in FQDN into hosts file.

seizart
December 16th, 2010, 08:57 PM
Thanks a lot for your reply.

To be more explicit and to be sure my problem is well understood:

I can access my website (hosted in a computer inside my localnetwork) from any computer outside my localnetwork through the www.mydomain.com
So i think my domain provider is correctly using my ipadress and my port redirection should be fine

I can't access my website from any computer inside my localnetwork through the www.mydomain.com, but i can access with the local ip adress (192.168.0.197)


Obviously what i want is to use the www.mydomain.com adresss both locally and outside my network

Could you be more explicit about ''FQDN into hosts file.'' as i don t know exactly how to do that.

Many thanks

arrrghhh
December 16th, 2010, 09:12 PM
In the client hosts file, you place a DNS record pointing 192.168.0.197 to www.mydomain.com. Depending on the client you're using, the location of the hosts file will be different.

You won't be able to access your site from your LAN using the FQDN (www.mydomain.com) unless your router or whatever DNS server your using points that for you. Adjusting the clients hosts file gets around this issue.

seizart
December 17th, 2010, 04:45 PM
Ok thanks

So is there anything i should know about this file hosts?

should i just add the line at the end of the file?

something like that ?

192.168.0.197 mydomain.org

Thnaks

arrrghhh
December 17th, 2010, 05:00 PM
Yup, you got it.


127.0.0.1 hosting.gmodules.com is what I have for an entry in my hosts file. Not sure if you need all those spaces (in my hosts file it's 1 tab...), I think it's just for readability.

seizart
December 17th, 2010, 07:42 PM
So i did it
And i have access to my website but still only from outside my network

i need to access my website from a computer inside my network with the public mydomain.com adress...

Is it just not possible ?

seizart
December 21st, 2010, 04:48 PM
somebody has an idea?

arrrghhh
December 21st, 2010, 06:02 PM
Please post your hosts file. Must be something wrong within them...

seizart
January 21st, 2011, 10:31 PM
Please post your hosts file. Must be something wrong within them...
here is my hosts file:

GNU nano 2.2.4 Fichier : /etc/hosts

192.168.0.197 oldfixe-PC030A-ABA-SR1135CL-NA430 # Added by NetworkManag$
127.0.0.1 localhost.localdomain localhost
::1 oldfixe-PC030A-ABA-SR1135CL-NA430 localhost6.localdomain6 localho$
127.0.1.1 oldfixe-PC030A-ABA-SR1135CL-NA430
192.168.0.197 videoconference.xxx.com

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


sorry for the delay i had to work on something else !

SeijiSensei
January 21st, 2011, 11:01 PM
Can you ping "videoconference.xxx.com"? Is the web server configured to serve pages for the virtual host videoconference.xxx.com? Are you requesting "http://videoconference.xxx.com/"?

Just to make sure, people here are talking about the hosts file on the client you're using to connect, though you should have an identical entry for the "videoconference" host in the /etc/hosts file on the server, too.

arrrghhh
January 21st, 2011, 11:47 PM
here is my hosts file:


GNU nano 2.2.4 Fichier : /etc/hosts

192.168.0.197 oldfixe-PC030A-ABA-SR1135CL-NA430 # Added by NetworkManag$
127.0.0.1 localhost.localdomain localhost
::1 oldfixe-PC030A-ABA-SR1135CL-NA430 localhost6.localdomain6 localho$
127.0.1.1 oldfixe-PC030A-ABA-SR1135CL-NA430
192.168.0.197 videoconference.xxx.com

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


sorry for the delay i had to work on something else !

You have 192.168.0.197 mapped to two different hostnames...

seizart
January 25th, 2011, 08:35 PM
I wish i could find something clear to configure my ubuntu !

I decided to reinstall everything but i keep missing something

all i want is to access my website from my external adress videoconference.xxx.com from my local network computer and from outside the network through internet.

it works well from outside my network but i can t make it work from my internal network after more than 5 try.

Can somebody give me a clear answer on that, is it possible to use my external adress in local or i have to use the local adress in local (192.168.0.197)

Many thanks

arrrghhh
January 26th, 2011, 12:29 AM
I wish i could find something clear to configure my ubuntu !

I decided to reinstall everything but i keep missing something

all i want is to access my website from my external adress videoconference.xxx.com from my local network computer and from outside the network through internet.

it works well from outside my network but i can t make it work from my internal network after more than 5 try.

Can somebody give me a clear answer on that, is it possible to use my external adress in local or i have to use the local adress in local (192.168.0.197)

Many thanks

Read my last post.

Lloyd_mcse
January 26th, 2011, 12:33 AM
If you are using a windows pc to connect to your domain/server, you can find the windows 7 host file -

C:\Windows\System32\drivers\etc\

and add...

192.168.0.197 your-domain.com
(http://www.your-domain.com)