Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Jacob Mathew" <jacobmat@addr.com>
To: Lim Boon Ping <syseeker@yahoo.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Setup simple PC-based router using IPTABLES
Date: Wed, 12 Jan 2005 14:40:47 +0530	[thread overview]
Message-ID: <012901c4f886$9acd2be0$5500a8c0@BLRADDRCOM> (raw)
In-Reply-To: 20050112085342.40592.qmail@web12503.mail.yahoo.com

#Allow all connections OUT and only existing and related ones IN"
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j 
ACCEPT
iptables -A FORWARD -i eth1 -o eth1 -j ACCEPT

# Enable SNAT (MASQUERADE) functionality on eth0"
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

in this scenario eth0 is external and eth1 is internal

regds
Jacob

----- Original Message ----- 
From: "Lim Boon Ping" <syseeker@yahoo.com>
To: <netfilter@lists.netfilter.org>
Sent: Wednesday, January 12, 2005 2:23 PM
Subject: Setup simple PC-based router using IPTABLES


> Hi,
>
> I need some help on using IPTABLES to setup a simple PC-based router (for 
> LAN usage).
> The PC consists of  a 10/100 NIC on eth0, and a gigabit fiber NIC on eth1. 
> The gigabit fiber NIC is connected to another fiber-based port, whereas 
> the 10/100 NIC is connected to a 10/100 hub. Now, for all packets coming 
> from eth0, forward it to eth1, and vice versa.
> Could anyone verify/suggest commands to set for this setting?
> # iptables -A FORWARD -i eth0 -o eth1
> # iptables -A FORWARD -i eth1 -o eth0
>
> Is it that's all we need to do? Thanks.
>
> Regards,
> Jocelyn
>
>
> ---------------------------------
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
>
> 



      parent reply	other threads:[~2005-01-12  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12  8:53 Setup simple PC-based router using IPTABLES Lim Boon Ping
2005-01-12  9:09 ` Ming-Ching Tiew
2005-01-12  9:10 ` Jacob Mathew [this message]

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='012901c4f886$9acd2be0$5500a8c0@BLRADDRCOM' \
    --to=jacobmat@addr.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=syseeker@yahoo.com \
    /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