LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-21-2001, 09:59 PM   #1
Rock
LQ Newbie
 
Registered: Dec 2001
Distribution: Red Hat 6.2
Posts: 3

Rep: Reputation: 0
Question IPchains


I have recently purchased a filtering device. This device needs to service 4 subnets. It is placed behind a firewall/gateway/router/VPN server on one of the subnets (192.168.0.*) and is serving that one just fine. One of the other subnets(192.168.3.*) is in the same building and connected to the same router. The other two subnets (192.168.1.* & 192.168.2.*) are in another building also hooked up to a firewall/gateway/router/VPN server.

My gateway servers are masquerading and I need to set up my ipchains so that all port 80 traffic goes through the filter (192.168.0.5). The filter will automatically then send requests out to the internet and back appropriately.

I hope I have explained that well enough so that someone can help me!?
 
Old 12-22-2001, 05:47 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
ipchains -P forward DENY
ipchains -A forward -i eth0 -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward

ifconfig eth0 192.168.?.? netmask 255.255.0.0

route add default gw 192.168.0.5

Last edited by DavidPhillips; 12-22-2001 at 05:51 PM.
 
Old 12-22-2001, 06:21 PM   #3
Rock
LQ Newbie
 
Registered: Dec 2001
Distribution: Red Hat 6.2
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply

Dave,

Thanks for the reply. The machines are at work and I won't be able to test your advise for a few days but I didn't want you to think I didn't appreciate your respose.
 
Old 12-22-2001, 06:36 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
cool,

Let us know what happens.
 
Old 12-22-2001, 10:57 PM   #5
Rock
LQ Newbie
 
Registered: Dec 2001
Distribution: Red Hat 6.2
Posts: 3

Original Poster
Rep: Reputation: 0
Response to Dave

Dave,

The solution you gave sets up masq, which is already active.

Next it routes everything though IP 192.168.0.5. I only need packets that are going out port 80 to go through the filter. The ohter problem I see is that the filtering device uses the server to send information out to the internet. If that servers default route is to send information to 192.168.0.5 I start a horrible loop of death.
 
Old 12-24-2001, 08:51 AM   #6
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
iptables -t nat -A POSTROUTING -p tcp --dport 80 -j DNAT --to 192.168.0.5:80


The above might work...
 
  


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
Ipchains brokenflea Linux - Networking 1 02-03-2004 05:44 AM
ipchains i.d. Linux - Security 5 08-21-2002 02:12 PM
ipchains help ... please> paulw Linux - Security 3 11-16-2001 10:15 AM
IpChains again ETT Linux - Security 3 07-24-2001 07:49 AM
[ipchains] MrGreg Linux - General 4 07-14-2001 11:35 PM

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

All times are GMT -5. The time now is 10:10 PM.

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