All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dharmendra T." <dharmu@nsecure.net>
To: "Anthony R. Vallario" <avallario@tecmasters.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Bridge/VPN question.
Date: 23 Jun 2004 14:12:22 +0530	[thread overview]
Message-ID: <1087980148.7626.35.camel@dharmu.nsecure.net> (raw)
In-Reply-To: <041201c45865$cb810cf0$c10da8c0@arvmobile>

Hi,

Are there any other rules you have defined? If no, this may work:

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP


iptables -A FORWARD -o eth0 -p tcp -m tcp -d <approved mail server>
--dport 25 -j ACCEPT
 iptables -A OUTPUT -o eth0 -p tcp -m tcp -d <approved mail server>
--dport 25 -j ACCEPT

Dharmendra T.
Linux Security and Admin,
www.nsecure.net

This message is intended for the addressee only. It may contain
privileged or confidential information. If you have received
 this message in error, please notify the sender and destroy the message
immediately. Unauthorised use or reproduction of 
this message is strictly prohibited.

On Tue, 2004-06-22 at 20:02, Anthony R. Vallario wrote:
> I hope you all can help. Ok, here's the setup
> 
> 
> Internet: eth0
> Lan: eth1
> Tunnel: tap0
> Bridge: br0 (tap0<->eth1)
> 
> 
> I have the firewall setup to be a gateway/router to the internet, and to the private offsite lan thru the tunnel. Everything works great, minus one thing.
> 
> I have FORWARD/OUTPUT rules for not letting certain traffic out to the internet. Mainly virus traffic and use of other mail servers. Only problem is they aren't working. Here are the rules:
> 
> 
> iptables -A FORWARD -o eth0 -p tcp -m tcp -d <approved mail server> --dport 25 -j ACCEPT
> iptables -A FORWARD -o eth0 -p tcp -m tcp --dport 25 -j DROP
> iptables -A OUTPUT -o eth0 -p tcp -m tcp -d <approved mail server> --dport 25 -j ACCEPT
> iptables -A OUTPUT -o eth0 -p tcp -m tcp --dport 25 -j DROP
> iptables- A FORWARD -o eth0 -p tcp -m tcp --dport 445 -j DROP
> iptables -A OUTPUT -o eth0 -p tcp -m tcp --dport 445 -j DROP
> iptables- A FORWARD -o eth0 -p udp -m udp --dport 445 -j DROP
> iptables -A OUTPUT -o eth0 -p udp -m udp --dport 445 -j DROP
> 
> Now if I take the tunnel and bridge are down(Only having eth1 NAT'D to eth0), everything works fine. I've read that iptables works at layer 3 and will not filter bridged interfaces. Well tap0 and eth1 are the bridged interfaces, not eth0. So why isn't the firewall stopping these packets? I can telnet to port 25 all day long on non-approved mail servers. 
> 
> 
> Anthony R. Vallario

-- 




  reply	other threads:[~2004-06-23  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 14:32 Bridge/VPN question Anthony R. Vallario
2004-06-23  8:42 ` Dharmendra T. [this message]
2004-06-23  9:08   ` Antony Stone
2004-06-23  9:30     ` Dharmendra T.
2004-06-23  9:40       ` Antony Stone

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=1087980148.7626.35.camel@dharmu.nsecure.net \
    --to=dharmu@nsecure.net \
    --cc=avallario@tecmasters.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.