LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   linux server (https://www.linuxquestions.org/questions/linux-server-73/linux-server-794157/)

dinakumar12 03-09-2010 04:01 AM

linux server
 
hi,

previously in our office there is no server for our domain.we just accessed it through public rental server.

but now we have planned to implement our own linux server.
can we configure the same old domain in our server, and if the client accesses our webpage they should get it from our server.is it possible


thanks in advance,
Dinesh.

Absent Minded 03-09-2010 04:49 AM

Yes, what you are asking is feasible. You will want a static IP most likely and then you will need to redirect your domain to the new IP address. I do recommend that you use a firewall of some kind between your network and the Internet. Myself, I use a dedicated firewall and then use port-forwarding to the nessary servers.

Blue_Ice 03-09-2010 01:26 PM

As Absent_Minded already said, this possible. The URL, that you use to connect to a webserver, is nothing more then a a piece of text that can be easily remembered by humans. When you enter the URL in the addressbar of your browser, a DNS server will translate it into the ip address of the webserver. For this all the old records that may exist on dns servers over the entire world need to be updated, if not some users may try to connect to the old server until the replication has completed. Usually this is not a big issue, due to the way dns servers and internet is build up.

frieza 03-09-2010 01:37 PM

one more thing to consider is the bandwidth your ISP provides you with, depending on the volume of traffic your website sees and how much your office uses will determine what you need, then see if what you have is enough or if you need to talk to your isp for more

a decent cable connection should be enough for a low to medium volume web server
a dsl would be enough for a low volume web server that doesnt host any video content and small to medium images or low quality audio
a dialup would be enough for the occasional use personal website that doesnt host video or digital audio (midi/mod music might work) and small images and but doesnt usually provide static ip

you may also want to make sure with your isp that hosting a web server on your connection is allowed by their TOS, i've been burned by that one before

just my 2 cents

dinakumar12 03-10-2010 01:42 AM

hi Absent minded,

Thank you very much for your reply. we are having our own static ipaddress.since i am new to linux i don't know how to redirect my domain to the new static ipaddress.i configured my domain in 192... series but my static ip is 50... series. so how to change my domain from 192... to 50....

ya you asked me to redirect it through iptables but what exact rule in iptables will allow me to do that.


thanks in advance,
Dinesh.

Blue_Ice 03-10-2010 04:25 AM

Quote:

Originally Posted by dinakumar12 (Post 3892529)
i configured my domain in 192... series but my static ip is 50... series. so how to change my domain from 192... to 50....

ya you asked me to redirect it through iptables but what exact rule in iptables will allow me to do that.

Is the server connected to the internet directly or is there a firewall server between the internet and the webserver?

In case it is connected directly to the internet, then you just have to open up the port on which httpd is running.
Code:

iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT
In the other case it is more complicated. For that you will have to add more rules that can work with NAT.

freelinuxtutorials 03-10-2010 04:53 AM

1.setup your own linux web server. I assumed it has private IP address e.g. 192.168.1.100
2.In order to see in that internet, you need a public IP 200.200.200.200
now, it depends on your network setup now? what firewall/gateway do you have.I'll give you a typical setup
-some firewall can set one-to-one NAT. let say 192.168.1.100 translated to 200.200.200.200, now open port 80 for inbound traffic for that IP address 200.200.200.200
-or you only have 1 static NAT IP,you can use iptables here.
-some setup, you have two NIC on your server, one is private , one is public.
3.if you can access your server via your public address .e.g. telnet 200.200.200.200 80
or if you want the domain name. temporarily add the domain name on your hosts file to test
4. now point the A record of your www and domain name to your own public IP. This will be done via your registrar/DNS server access.

Web31337 03-10-2010 05:31 AM

This post may be offtopic, I know, please forgive me if this is not related: I am more concerned about how did you managed to get IP 50.*.*.*, I never saw them before.
The class A info for 50 says it belongs to
Quote:

Joint Tactical Command, Control, and Communications Agency, AZ (NET-JITCNET2)
Are you related to this? You're in India while this seem to be related to US. Most likely you are not, and in that case IP 50.*.*.* is not belong to you and it's not working. That may be your NAT again. I've seen many networks just like that, having beautiful IPs of internet class just to remember them.
See, I'm very curious about interesting IP addresses... I never really saw anyone from IP 50 ever anywhere. If it really belongs to you and it works, please reply here(or mail me from my nick dropdown menu) so I will mark subnet 50 has some users in it. Any additional info is welcome. Thank you for sharing information. I will understand if you won't reply this, you are right to do so.

Again, please, excuse me for my curiosity, I can't stay away from asking these questions, my head is full of this useless information about different subnets, IPs, etc :/

dinakumar12 03-10-2010 05:47 AM

hi web31337,

mine is 59.....,but i had pointed that mine is 50.... by mistake.
so i feel sorry for making you curious.

thanks&regards,
Dinesh.

Web31337 03-10-2010 06:15 AM

oh, 59 is right one for india. thanks for input.
try going the way freelinuxtutorials points

Absent Minded 03-10-2010 11:32 PM

Quote:

Originally Posted by dinakumar12 (Post 3892529)
hi Absent minded,

Thank you very much for your reply. we are having our own static ipaddress.since i am new to linux i don't know how to redirect my domain to the new static ipaddress.i configured my domain in 192... series but my static ip is 50... series. so how to change my domain from 192... to 50....

ya you asked me to redirect it through iptables but what exact rule in iptables will allow me to do that.


thanks in advance,
Dinesh.

redirecting your domain to your ip address is done at your registrar (where you got your Domain from). There "should" be a place where you an log-in and change that information.

dinakumar12 03-11-2010 02:43 AM

hi absent minded,

yes you are right. i did that.but we can't able to access our domain outside from our network. As you said this must be related with firewall.From our LAN (192...series)
we connected to static ip(59...series) through a gateway.but i dont know how to map this 192 series to 59 series.

i feel happy to have a reply from linux tutorial,but i don't know how to apply that in my scenario. can you say me what you have done through iptables for your domain, in detail.

thanks in advance,
Dinesh.

dinakumar12 03-11-2010 10:48 PM

hi,

The job is almost done,but while opening the port 80,should i open it both for my internal(192...)ip and for my external ip(59...).

Because i can open the port for my internal ip using iptables but for my external ip i should login to the router to open port 80.

thanks&regards,
Dinesh.

Absent Minded 03-12-2010 12:36 AM

Okay, you need to forward port 80 on the router to port 80 on the web server. If your router is not your active firewall then you will have to instead forward port 80 through your firewall to your web server. In that case iptables will have to be configured to accept incoming requests on port 80 and then port-forward the request to port 80 on the server. I a not clear on what your setup is.

dinakumar12 03-12-2010 02:56 AM

hi

our LAN is connected to internet through the firewall in the router.hope this will give you some idea about our network.

thanks in advance,
Dinesh.


All times are GMT -5. The time now is 11:35 AM.