From: gui <whereisgui@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: Protecting multiple webservers
Date: Wed, 19 Jan 2005 12:37:06 -0800 [thread overview]
Message-ID: <48be50bb0501191237386d15c8@mail.gmail.com> (raw)
Hi,
I did some work but I still can't get my new set up to work.
I'm going describe my problem again to avoid confusions.
Some background info:
Firewall: linux kernel 2.6.9-1.667 & iptables v1.2.11
Zinfandel and Cabernet (not the actual names) are web servers with
real domain names and public IP addresses.
Zinfandel's public IP address x.x.174.104
Cabernet's public IP address x.x.174.106
I don't have access to the DNS server and the IT dept doesn't want to
make any changes to the DNS server.
Problem: I need to put two web servers behind a firewall without
making changes to the DNS server.
My new set up:
Zinfandel Cabernet
192.168.0.2 192.168.0.3
| |
`---------- ------------'
|
switch
|
| eth1 192.168.01
FIREWALL
| eth0 x.x.174.103 (Primary address)
| eth0:0 x.x.174.104
| eth0:1 x.x.174.106
|
Internet
I added the two IP addresses to eth0 using iproute2 as previously
suggested and I can ping the new addresses without a problem. I can
even connect to the firewall with SSH using those addresses. This
tells me that anti-arp spoofing is not an issue on the network and
that I can have multiple IP addresses binded to one NIC. However, the
forward rules don't work. I will appreciate any help that you can
provide.
The following is my ruleset file:
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT DROP
:FORWARD DROP
:OUTPUT ACCEPT
# allow local loopback connections
-A INPUT -i lo -j ACCEPT
# allow pings
-A INPUT -i eth0 -p icmp -j ACCEPT
# drop INVALID connections
-A INPUT -m state --state INVALID -j DROP
-A OUTPUT -m state --state INVALID -j DROP
-A FORWARD -m state --state INVALID -j DROP
# allow all established and related
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# allow connections to DNS servers
-A OUTPUT -d x.x.100.129 -m state --state NEW -p udp --dport 53 -o
eth0 -j ACCEPT
#allow computers behind the firewall to access the DNS servers.
-A FORWARD -d x.x.100.129 -m state --state NEW -p udp --dport 53 -i
eth1 -o eth0 -j ACCEPT
# allow incoming SSH connections
#Only my desktop can ssh to the firewall
-A INPUT -i eth0 -s x.x.174.12 -p tcp --dport ssh -j ACCEPT
# allow outgoing connections from web servers.
# added these lines so I can browse the web from the web servers
-A OUTPUT -d 0/0 -m state --state NEW -p tcp -m multiport --dport
http,https -o eth0 -j ACCEPT
-A FORWARD -s 192.168.0.3 -d 0/0 -m state --state NEW -p tcp -m
multiport --dport http,https -o eth0 -i eth1 -j ACCEPT
-A FORWARD -s 192.168.0.2 -d 0/0 -m state --state NEW -p tcp -m
multiport --dport http,https -o eth0 -i eth1 -j ACCEPT
COMMIT
*nat
#set up IP forwarding and nat
#This is the primary IP address for eth0
-A POSTROUTING -o eth0 -j SNAT --to x.x.174.103
# forward ports to the proper servers
-A PREROUTING -i eth0 -p tcp -d 130.17.174.104 --dport 80 -j DNAT --to
192.168.0.2:80
-A PREROUTING -i eth0 -p tcp -d 130.17.174.106 --dport 80 -j DNAT --to
192.168.0.3:80
COMMIT
Thanks.
next reply other threads:[~2005-01-19 20:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 20:37 gui [this message]
2005-01-19 20:58 ` Protecting multiple webservers Jason Opperisano
-- strict thread matches above, loose matches on Subject: below --
2005-01-19 22:35 gui
2005-01-19 21:07 Hudson Delbert J Contr 61 CS/SCBN
[not found] <15069645.1105491740310.JavaMail.rct@kale>
2005-01-12 4:01 ` Bob Tellefson
2005-01-12 15:14 ` Maxime Ducharme
2005-01-12 15:37 ` Samuel Jean
2005-01-12 19:57 ` John A. Sullivan III
2005-01-12 1:01 gui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48be50bb0501191237386d15c8@mail.gmail.com \
--to=whereisgui@gmail.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox