LinuxQuestions.org
Visit Jeremy's Blog.
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 06-01-2006, 04:12 PM   #1
smithsa
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
Private web server for multi-homed machine


I've got a networking problem that I'm hoping someone can help me with. I have a computer with 2 ethernet cards that's running Damn Small Linux (Although this could change if necessary. I could run a different distro if necessary as long as I can boot off of a CD).

One ethernet card is plugged into a router and running on the 192.168.0.X network (as assigned by the router's DHCP server). What I want to do is use a crossover cable to connect the other ethernet card to another computer that's not connected to anything else. The only purpose of this computer is to run a web server on port 80 that will be accessed from the multi-homed computer. Nothing else needs access to this machine.

What do I need to do to set this up? Does the multi-homed computer need to run a DHCP server to assign an IP address to the web server machine? How should the second ethernet card get an IP address, and does it need to be on a different network then the first card? Does the web server computer need to get its IP address from DHCP? Is there anything I can do if that machine has a default IP address assigned to it, like in the case of a network-enabled device such as a network enabled webcam?

I'd really appreciate any help I can get. I'm also not really a Linux person, so the more details you can give, the better.

Thanks in advance,

Sander Smith
 
Old 06-04-2006, 03:05 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
It's better to use static ip addresses in this situation. You don't say what os you are using on the 1st box. Basically you need to place the second box on a different subnet to the 1st. In this case you have the primary addresses on 192.168.0.X so you could use 192.168.1.X for the second range. You would need to tell the router to forward requests for port 80 ( conventional www access) to the ip address of the Internet server. The next step is to get forwarding going from the first box to the second. i.e. you need to tell the 1st box to forward requests on port 80 to the second box. You would have to work this out for yourself based on the os.The next thing is gateway addresses. The gateway for the server is the ip address of the ethernet card the server is attached to on the 1st box and the 1st box uses the router address as the gateway.
Pay particular attention to security of the server with regard to a fire wall and ssh access. If you don't need access the server from outside your own lan only have port 80 open to reduce the risk of compromise. There are lots of bad people out there that are going to be probing the server for holes from the minute you put it on line. Make sure you read the security recommendations in the security section of LQ. You may think that your server does not contain anything important and you don't need anything fancy but it could easily be hijacked and used to attack other servers out there so please be responsible in your approach.
I also have some basic info on adsl based servers with links to other info on my server.

Last edited by TigerOC; 06-04-2006 at 03:08 AM.
 
  


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
Multi Homed Gateway Router Problem conradg Linux - Networking 2 03-30-2006 11:51 PM
Multi homed gateway nukenstien Linux - Networking 4 02-10-2005 10:07 AM
Linux Routing to Multi-Homed Host MightyCranium Linux - Networking 0 03-16-2004 05:14 PM
Web Server on private IP lambmt Linux - Networking 4 09-29-2003 02:40 PM
Proper Solution for Multi-Homed IP ytene Mandriva 0 08-25-2003 06:14 AM

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

All times are GMT -5. The time now is 03:38 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
Open Source Consulting | Domain Registration