LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2005, 06:26 AM   #1
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Rep: Reputation: 31
Smile Setting up own web server [Solved]


Hello,

I want to host my small web site on own web server. I have Mandrake 10.1 official release and using apache 2.0.x version. I am running 4 (name based) virtual sites on my system. There are 4 other systems connected with this. And my Internet connection is to an other system in this network.

here is a summary of current setup

PC1 MANDRAKE 10.1 192.168.0.2 WebServer/Local MailServer
PC2 Windows 98 SE 192.168.0.1 Connected Direct to Internet
PC3 Windows 98 SE
PC4 Red Hat 9 Using as a Desktop PC



all of four PC are connected to each other via hub and working fine. Internet connection is shared and I can use internet in all pcs. Currently I haven't STATIC IP, but once I got my webserver accesible from out side with current IP, I buy one and also a Domain name. But for now I will use No-Ip like service.

Now, As Internet is connected on PC2 (which isn't running server) only IP visible to out side user is 61.0.204.101 [not real ip, just for example], But My webserver is listing on 192.168.0.2. So I want to know, how can a out side visitor (who is not connected physically to my PC1) will access that web server.

I know 192.168.0.2 is a class C network address and that can't accessible out side of subnet.

So I think a way of Redirect Application, but not sure. How a web server farm manage this. do they have seprate net connection for each machine they have ? if so.. then is there any alternative ? because I am not planning for such big level.

Thanks,
Kirtimaan.

Last edited by kirtimaan_bkn; 09-22-2005 at 08:08 AM.
 
Old 09-21-2005, 06:51 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
You Need to setup NAT and Port Forwarding on the machine connected to the internet.
For example, Port forwarding will redirect all traffic to port 80 (http) to 192.168.X.X (your linux server)

But i dont know much about windows, I dont know if windows98 can perform NAT (network address translation) or Port Forwarding.

Ask on a windows forum, OR change your netowrk wireing, so that Linux is directly connected to the internet.

Linux can habndle internet shareing much better than windows98.
 
Old 09-21-2005, 07:30 AM   #3
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Can I do this with Linux

Quote:
You Need to setup NAT and Port Forwarding on the machine connected to the internet. For example, Port forwarding will redirect all traffic to port 80 (http) to 192.168.X.X (your linux server) But i dont know much about windows, I dont know if windows98 can perform NAT (network address translation) or Port Forwarding. Ask on a windows forum, OR change your netowrk wireing, so that Linux is directly connected to the internet. Linux can habndle internet shareing much better than windows98.
Hello,

Thanks for your quick reply. Okay, I can install Linux on PC2 (which is connected to internet and have Windows 98 SE) . Then Can you guide me how to configure that in Linux? I never come in touch with NAT and port forwarding conf. Is there inbuilt support for Network Address Translation in linux or I have to use any app. If any other app, can you suggest me which one.

Again thanks for quick reply and your answer.

Thanks,
Kirtimaan.
 
Old 09-21-2005, 11:40 PM   #4
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Hello,

Additionally I have another question related to previous reply. Whenever I will get STATIC IP address, my ISP will give me a ADSL connection with a ADSL modem, which I works like a small router. means It will have its own IP (like 192.168.0.55) and I have to set all pc's gateway to this IP.


Now, then how can I apply NAT and port forwarding, since there as far as I know no windows or linux will be there installed on ADSL modem itself.

Thanks,
Kirtimaan
 
Old 09-22-2005, 01:51 AM   #5
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Usually the router itself has a (password protected) web interface for set-up and administration, including port-forwarding.

Some routers (e.g. linksys wrt54g) run linux, although it is not obvious to the user.
 
Old 09-22-2005, 06:30 AM   #6
cyto
Member
 
Registered: Aug 2004
Location: London
Distribution: FreeBSD 6.0, Freebsd 5.3, Freebsd 4.10, SuSE 9.2 pro, Slackware 10.1, FreeBSD 5.4 RC3
Posts: 270

Rep: Reputation: 30
Most of the routers run linux. I wouldnt sugest you to run windows as your gateway. You can use Openbsd or linux as your gateway. When you get your adsl modem, you should run your modem in bridge mode with a pc. If you are gettin a router, you can use the web interface to setup forwarding and stuffs like that. Cheers
 
Old 09-22-2005, 08:07 AM   #7
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Smile Thanks

Hello,

Thanks to all of you. It seems that it isn't going to be hard, if ADSL modem itself have such option. Again, Thanks to all.

Kirtimaan
 
Old 09-22-2005, 08:12 AM   #8
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
If you really want to do this in 98SE:
http://support.microsoft.com/kb/q231162/

You can use iptables DNAT for port forwarding in Linux.
 
Old 09-22-2005, 11:21 PM   #9
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Smile Thanks

Thanks Snowbat,

I checked that and I will use that as a temporary solution till I get ADSL.

Thanks to all.

Kirtimaan.
 
Old 09-22-2005, 11:34 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
Some Cable/DSL routers allow you to place one of the ports in the DMZ. This is where you want the web server.
 
Old 09-22-2005, 11:35 PM   #11
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Web server farms typically use a number of techniques such as round-robin DNS, software load balancers, and dedicated hardware load balancers.

Anandtech have an interesting article about their setup:
http://anandtech.com/printarticle.aspx?i=1456
 
Old 09-23-2005, 01:58 AM   #12
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Hello Snowbat,

Thanks for updating me !

Kirtimaan.
 
Old 10-28-2005, 07:58 PM   #13
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
How to publish my webpage?

I would like to publish my webpage to let outside world take a look. Please really help this newBie.

I find this thread and I got similar problem like you, so I post my question here.

I using the probably the same Linksys router wrt54g as DHCP/gateway and it assign IPs to local machines. I set maximum number of clients to be 8. So the range for the LAN is 192.168.1.100 - 192.168.1.107

On the Linksys router, DHCP is enabled, I setup port forward for any requests coming in on port 80(http) and 53(DNS) to be directed to 192.168.1.107(my web server private IP)

Port Range Forward
Application Start End Protocol IP Address Enable
http 80 80 tcp/udp 192.168.1.107 x
dns 53 53 tcp/udp 192.168.1.107 x

Also put the web server private IP (192.168.1.107 ) in DMZ inside router.

If outside machines access my page(http://www.mysite.com), the registered domain points to my dynamic IP account (xxxx.dyndns.org). And account details also set in the gateway router.


But outside still could not see my page, the error is:
ERROR
The requested URL cound not be retrieved
While trying to retrieve the URL http://xxxx.dyndns.org
The follow error was encountered:
connection failed
They system returned:
(111) connection refused


Please help my page can say helloWorld to others.
 
Old 10-28-2005, 11:14 PM   #14
kirtimaan_bkn
Member
 
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Original Poster
Rep: Reputation: 31
Hello,

http://www.linuxquestions.org/questi...hreadid=376448

this is a thread where you can get some idea. Actually I didn't got my router working right now and also trying BLFS on my system so I paused this experiment and will resume on my own distro (BLFS) !

Thanks,
Kirtimaan
 
Old 11-20-2005, 09:33 PM   #15
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Rep: Reputation: 15
forward 80, broke www?

i was trying to set up a server on my LAN, (cable modem and router). Everything was fine, ftp and stuff going. I then forwarded port 80 to the server, and the server was able to access www, but the next time I tried my main machine, www requests just timed out. Is this normal? Will I have other configuring to do if I forward port 80 to the server? Are all the pages I'm requesting from my machine being sent back, but getting redirected to the server? How do I get around that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a web server and not only that... axelwing Linux - Newbie 4 05-19-2005 09:40 AM
Setting up a web server Spyiish Mandriva 15 11-09-2004 08:06 PM
Setting up a web server lemonsensation Linux - Newbie 3 08-13-2004 12:20 AM
setting up password protected web forms on an apache web server AZDAVE Linux - Security 3 07-07-2004 12:03 PM
Help setting up web server KnightEagle Red Hat 4 10-05-2003 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration