Network Config with my DSL to Host Site

Posted on 2003-11-21
Last Modified: 2010-05-18
Hello Experts!

I have been trying to configure my servers but no luck...
My problem goes this way. I have acquired a DSL to an ISP with a /29 IP block. I setup a firewall/gateway with a linux rh9 server with 2 nic. with 1 nic pointing at the net and one on my Lan. I have added an additional server which I intent to be my web server. How will I add my additional server to my network considering that it must have a routable ip, the same with my Internet gateway?

I tried to setup alias on my Lan's Interface but I am not able to do it? Should I do NAT on my firewall? Im not so familiar with NAT?

What would be the best thing to do?
Thank you for your advance answeres.

{{email addr removed by jmcg during cleanup}}
Question by:elmerph
LVL 40

Accepted Solution

jlevie earned 250 total points
ID: 9801728
The easiest solution would be to set up static NAT translations for each server on the inside of your firewall.  You need to create an IP alias on your outside NIC for each of the routable IP's that will be statically mapped and then use a pair of rules or each NAT'ed IP, something like:

# To Statically NAT an outside IP ( to an inside IP ( you'd
# do something like:
iptables -t nat -A PREROUTING -i $OUTSIDE -d -j DNAT --to-destination
iptables -t nat -A POSTROUTING -i $OUTSIDE -s -j SNAT --to-source

The usual rules about allowing inbound connections also apply.

Author Comment

ID: 9801807
how will i test it that way?

can i do this..-> create an alias on my LAN Interface with an ip the same ipblock of INTERNET Interface? then change the ip of my web machine to the same block ?

LVL 40

Expert Comment

ID: 9810357
From outside you'd obviously just go to the routable IP of your web server, but from inside of the firewall you'd us the inside IP of the server. If you are using name based virtual hosts of the web server you'll need to either have a local DNS that equates the host name to private IP of the server or create hosts file records on each of the systems.

Assisted Solution

Netelligen earned 250 total points
ID: 9835516
A great source of information on this can be found at

Shorewall is a set of IP Tables wrapper scripts that is the easiest and most flexible that I have found... but the best part of this is the excellent documentation that this site provides.

Hope this helps.


Expert Comment

ID: 12210621
you can run the webserver on a private ip inside your network.
Then set up the gateway with Shorewall to NAT any traffic going out and to DNAT any incoming port 80 requests to your webserver private IP.

This is VERY easy if you are using webmin.  :P

let me know if you need more info on configuring NAT/DNAT...
jlevie's solution also sounds appropriate.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lame BIND 9.3 10 69
how to monitor remote shell execution on linux 9 104
apache and php 3 125
linux service nerwork restart throwing eth1 not dound? 5 87
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question