Jump to content

routing to 2 webservers


nodine
 Share

Recommended Posts

:help:

I am trying to use a mandrake 9.1 box as a router/firewall for 1 apache webserver and 1 windows 2k webserver.

My mandrake box i am using as a router has 2 nics, with eth0 getting an IP from a router via dhcp. eth1 connects to a hub, which contains the 2 server boxes.

 

I have a few questions. First, my router can reach the internet through eth0, so I assume i should make that the defualt gateway for all traffic. How do I do this? And how do i make this my default configuration after boot up?

 

Second, I would like to make my apache server link to the internet through the mandrake router. To do this I would like to assign it an IP (say, 192.168.1.105) and make the router's eth1 recognize requests to and from the internet. How do I configure this on the router?

 

I already have IPv4 packet forwarding and Masquerading enabled at startup on my routing box, but do not know how to proceed. Any help would be highly appreciated.

 

thanks in advance

Link to comment
Share on other sites

are you using shorewall to do your masquerading?

if you are you can use shorewalls config files to make routes in your network.

 

#       Example: Forward all ssh and http connection requests from the internet
#                to local system 192.168.1.3
#
#       #ACTION SOURCE  DEST            PROTO   DEST    SOURCE  ORIGINAL
#       #                                       PORT    PORT(S) DEST
#       DNAT    net     loc:192.168.1.3 tcp     ssh,http
#

 

thats from the /etc/shorewall/rules file where you define your routes and open ports. (you can also choose open ports through MCC, though i'd advise stopping that as it has a habit of deleting the routes you setup).

 

once you change anything in those files, restart shorewall "service shorewall restart"

You can also set shorewall to start at boot in the services section of MCC.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...