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

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CPU#7 stuck for 22s! 4 270
Lame BIND 9.3 10 58
Getting Ubuntu Linux Console to show boot beyond error notification 5 76
Linux SSH Error 9 98
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now