All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rob Sterenborg" <rob@sterenborg.info>
To: netfilter@lists.netfilter.org
Subject: RE: help with routing/firewall
Date: Thu, 18 Dec 2003 21:46:10 +0100	[thread overview]
Message-ID: <20031218204612.CB1038718@sterenborg.info> (raw)
In-Reply-To: <20031218180112.66315.qmail@web20419.mail.yahoo.com>

> Simple configuration. 
> eth0 internet
> eth1 local net
> Everything accepted from eth1, nothing from eth0, 
> traffic from eth1 is routed to internet.
> IP forwarding is enabled.
> From local net I can ping eth1 and eth0 (that means 
> machine is routing packets), but I cant go outside 
> eth0. Same happens when ther is no firewall. What's 
> the problem with routing?
> What comands can I use to monitor what is happening 
> with packets?

So do your masq/snat rules look like ?

Should be something like :
(echo "0" > /proc/sys/net/ipv4/ip_forward)
iptables -P FORWARD DROP
iptables -A FORWARD -i eth1 -o eth0 -s <local_net> \
    -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -s <local_net> \
    -j SNAT --to-source <inet_ip>     ** OR **
iptables -t nat -A POSTROUTING -o eth0 -s <local_net> \
    -j MASQUERADE
(echo "1" > /proc/sys/net/ipv4/ip_forward)

Gr,
Rob



  parent reply	other threads:[~2003-12-18 20:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-18 18:01 help with routing/firewall Fred Gurn
2003-12-18 18:08 ` Juan Hernandez
2003-12-18 18:15   ` Ian Hunter
2003-12-18 18:33     ` Jeffrey Laramie
2003-12-18 19:11     ` Togan Muftuoglu
2003-12-18 18:19 ` Jeffrey Laramie
2003-12-18 20:46 ` Rob Sterenborg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-18 19:29 Togan Muftuoglu

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=20031218204612.CB1038718@sterenborg.info \
    --to=rob@sterenborg.info \
    --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.