LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2003, 10:06 PM   #1
Z28kid
Member
 
Registered: Jan 2003
Location: Long Island
Posts: 72

Rep: Reputation: 15
Will this work?


I have linux box that i want use as a web server also i have a regular windows computer. I will be using a cable modem with no-ip.com to keep the ip address updated for the web server. My question is can I use the same internet connection to browse the web with my windows computer and will people still be able to find my websites on the linux machine under the same ip? if not how would i go about sharing the internet with the windows computer so i can browse and people will still be able to look at websites off the webserver?
 
Old 02-22-2003, 10:17 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I haven't tried any web hosting, but I know you can have several machines effectively "sharing" an IP, by using a firewall of some kind, and/or IP masquerading (look for information on iptables).

For example, my setup is one Linux box as a firewall, which has the cable modem. It is connected to my LAN, through a hub, which has two other machines (another Linux box and a Windows 98 box) on it also. All three can do web browsing and the like, and as far as the outside world knows, it's just one machine with one IP. The firewall handles all the gritty stuff.

As for web hosting, I believe (don't quote me on this) you need to have your web server either outside the firewall, or inside it, with your firewall configured to forward port 80 to the appropriate machine. If the firewall and webserver are both on the same machine, this will be less of a problem (you just need to make sure your firewall isn't refusing connections from port 80).
 
Old 02-22-2003, 11:03 PM   #3
Z28kid
Member
 
Registered: Jan 2003
Location: Long Island
Posts: 72

Original Poster
Rep: Reputation: 15
So should i just a get regular hub to connect the computers or do i need a router?

The only firewall i care about is on the webserver which i would put both on the same box.

But i could effiectly surf the web on my windows and all my webseerver the webpages would still be found under the same ip?
 
Old 02-23-2003, 12:20 AM   #4
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
You will have a router, that is your linux machine set up w/iptables. All you *need* is a hub. My opinion is that, unless your traffic is really high on your LAN it should be sufficient. If your collisions are too high, then I personally would go with a switch. But if you are just browsing with one machine inside your firewall (again, the linux server), you should be set.
 
Old 02-23-2003, 01:26 AM   #5
Z28kid
Member
 
Registered: Jan 2003
Location: Long Island
Posts: 72

Original Poster
Rep: Reputation: 15
I really don't expect traffic to be high. so as long my windows is inside linux it is fine? How would i set this up so that I have my windows behind the firewall of the linux webserver? sorry im a
 
Old 02-23-2003, 02:06 AM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
I did something similar to what is suggested in this IP Masquerade Configuration Guide. I tested out the configuration by issuing the commands in an xterm window. Once I could connect to the "outside world" from a computer on the inside, I used the command iptables-save (this is a RH system, I am not sure if that if RH specfic) to put the commands in a file called /etc/iptables. My setup scripts use iptables-restore to reset things on bootup.

I used the 192.168.1.0/24 network range implied at this site,,, one can of course choose any of the range of ip addresses reserved for local use, with appropriate changes to the commands.

Note that if your kernel must be compiled with iptables support. I suspect most stock kernels are these days, but I haven't used one since RH5.2. There are a bewildering array of iptable options when building your own, some are certainly essential, some are nice, and some only needed for peculiar situations.

Have fun. I was really impressed with the ease of setting everything up once the kernel was OK. And that was without a GUI . You can setup DHCP for your local machines, but I just gave them static local IP addresses, felt no reason to complicate matters.

Last edited by fsbooks; 02-23-2003 at 11:36 AM.
 
Old 02-23-2003, 03:51 AM   #7
Crunch
Member
 
Registered: Feb 2003
Location: York, PA
Distribution: Slackware, FreeBSD, OpenBSD
Posts: 162

Rep: Reputation: 30
Whoa, I was wondering this a few minutes ago too ;] oof, Well thanks for actually helping even ME out on this one i just so happend to stumble across this stuff thanks 8)
 
Old 02-23-2003, 01:59 PM   #8
Z28kid
Member
 
Registered: Jan 2003
Location: Long Island
Posts: 72

Original Poster
Rep: Reputation: 15
So if use a cable modem with no-ip addressing for the Masquerade Configuration Guide would I use the Static or the dynamic scrpit?

Also do i have to write the masquerade scrpit or do i just modify one in linux already?
 
  


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
Does the mounting of a *BSD partition on linux work work well when rw ? kloss *BSD 3 10-08-2005 02:21 PM
Will Ubuntu Work work With my Wireless Card? PulsarSL Ubuntu 3 10-07-2005 10:33 PM
got ALSA to work in root, need help getting it to work in my user profile ic3 Slackware 2 11-28-2003 10:32 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 10:39 PM
UPS cable didn't work. A cool work-around jlangelier LinuxQuestions.org Member Success Stories 1 07-18-2003 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:50 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration