LinuxQuestions.org
Help answer threads with 0 replies.
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 04-11-2003, 11:14 AM   #1
mgould00
LQ Newbie
 
Registered: Apr 2003
Posts: 3

Rep: Reputation: 0
Question probably a simple answer....


i am a newbie that has sucessfully implemented a rh8 box running firestarter as a firewall for my lan. i really like how it works, but i have a question.....i recently was a victim of a web server hack and would really like to put my web server behind the firewall and just pass the http info through it. my web server has 2 nics, 1 external and 1 internal. i thought all i had to do was us my rh8 internal ip as my gateway (at least that is what i have done for my internal client machines...) for my external nic on my web server, but that doesnt seem to do anything. how can i accomplish this?

thanks in advance......
 
Old 04-11-2003, 05:14 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
If you're trying to use your linux box as a router for other machines with internal ip addresses (192.168.XXX.XXX or 10.XXX.XXX.XXX), you'll need to setup ip masquerading. Check out this thread, it should help you out. If you're not familiar with iptables, definitely check out the howto's first.

http://www.linuxquestions.org/questi...threadid=51835

If you just want to forward http traffic to your webserver, you need to setup ip forwarding by adding:

iptables -t nat -A PREROUTING -d xxx.xxx.xxx.xxx -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination yyy.yyy.yyy.yyy

Where xxx... is the address of your linux box and yyy... is the address of your internal webserver. Then add these to your filter table.

iptables -A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 80 -m state --state NEW,RELATED -j ACCEPT

iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT


Last edited by Capt_Caveman; 04-11-2003 at 05:23 PM.
 
Old 04-11-2003, 08:21 PM   #3
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Smoothwall may be worth checking into.
Small footprint router/firewall that can run on an old PC. Lots of folks like it. I am about to give it a try myself.
Good Luck
 
  


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
Printer problem, probably simple answer... mjkelly93 Linux - Hardware 2 10-23-2005 08:28 PM
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
Simple (easy to answer) questions phillips321 Linux - Software 10 01-20-2005 08:23 AM
What's the site I'm looking for.... simple answer! randyriver10 General 4 09-03-2004 03:04 PM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 04:08 AM

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

All times are GMT -5. The time now is 07:53 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