LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-25-2003, 11:57 AM   #1
sdbaroni
LQ Newbie
 
Registered: Aug 2003
Location: San Diego, CA USA
Posts: 4

Rep: Reputation: 0
iptables setup for simple fwd to web server


Hello,

Any iptables experts out there? I am trying to setup a linux firewall to do simple forwarding to a local web server - my basic config is the following

(internet) -> (cable modem) -> <public addr>(linux firewall)<local address> -> (local LAN) -> <local addr>( WEB server )

Does anyone know of any good examples of setting something like this up? I have used the "Easy Firewall Generator for IPTable" tool and have been working through Robert Zeiglers book "Linux Firewalls 2nd Edition". Any other pointers to iptables resources?

Thanks,

SD
 
Old 08-27-2003, 02:59 PM   #2
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Rep: Reputation: 30
Try the IP Masquerade HOWTO:

http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/
 
Old 08-27-2003, 03:45 PM   #3
tommyj27
Member
 
Registered: May 2003
Distribution: Ubuntu, Slackware
Posts: 43

Rep: Reputation: 15
iptables -t nat -A PREROUTING -p tcp --dport $EXTERNALPORT -j DNAT --to-dest $WEBSERVER:80

where $EXTERNALPORT is the external port you want to reroute to the local host $WEBSERVER

hope this helps
 
Old 08-28-2003, 12:05 AM   #4
sdbaroni
LQ Newbie
 
Registered: Aug 2003
Location: San Diego, CA USA
Posts: 4

Original Poster
Rep: Reputation: 0
thanks for the feedback - it all helped.

with alot of reading and a great tutorial at www.faqs.org/docs/iptables i was able to get a fw running with both a local private zone and dmz. the above mentioned link has clear easy to follow examples of several different network configurations.

sd
 
  


Reply



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
[IPTABLES] open ext access to web server on GW server kozaki Linux - Networking 3 08-27-2005 05:11 PM
How do I setup a simple name server? jrbush82 Linux - Networking 4 07-18-2004 08:14 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 03:09 AM
A simple web server MikeeX Linux - General 6 11-14-2002 01:15 PM
Which Distro for a fwd mail server bkeating Linux - General 2 05-03-2002 02:20 PM

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

All times are GMT -5. The time now is 12:23 AM.

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