From: "Wennie V. Lagmay" <wlagmay@yanbulink.net>
To: "Taylor, Grant" <gtaylor@riverviewtech.net>,
netfilter@lists.netfilter.org
Subject: Re: routing within same nic card
Date: Tue, 31 May 2005 09:10:35 +0300 [thread overview]
Message-ID: <00ca01c565a7$759eeaa0$d40aa8c0@winxp> (raw)
In-Reply-To: 429BFAE6.90200@riverviewtech.net
Hi,
The information you've given is very helpfull, however for your further
analysis,I would like to give my exact config so that you can double check
it
Presently I have 2 NIC cards;
eth1 = 212.119.xxx.98/30 directly connected to internet
eth0 = 212.119.xxx.105/29 connected to LAN, with this setup everything is
working fine
now I need to add another network, since I cannot Add another NIC card, my
solution is like this
eth1 = 212.119.xxx.98/30 directly connected to internet
eth0 = 212.119.xxx.105/29 connected to LAN1
eth0:1 = 192.168.3.0/26 connected to LAN2
I already done the 3 lines below
sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD -s 192.168.3.0/26 -d 212.119.xxx.104/29 -j ACCEPT
iptables -A FORWARD -s 212.119.xxx.104/29 -d 192.168.3.0/26 -j ACCEPT
Thanks,
Wennie
----- Original Message -----
From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: <netfilter@lists.netfilter.org>
Sent: Tuesday, May 31, 2005 8:49 AM
Subject: Re: routing within same nic card
>> I have 1 NIC card with 2 ip address:
>> IP1 = 192.168.3.1/255.255.255.192
>> Network 1 = 192.168.3.0/255.255.255.192
>>
>> IP2 = 192.168.4.1/255.255.255.248
>> Network 2 = 192.168.4.0/255.255.255.248
>>
>> My question, how can workstations from network 1 reaches the workstations
>> in network 2 and vice versa using IPtables?
>
> This really is not an IPTables issue as this is more a routing issue than
> it is a packet filtering issue. All you need to do to enable the
> ""routing would be to enable IP forwarding via one of these two methods:
>
> sysctl -w net.ipv4.ip_forward=1
>
> or
>
> echo "1" > /proc/sys/net/ipv4/ip_forward
>
> The only thing that IPTables might be interfering with this on would be if
> you have your default FORWARD policy to DROP. In that case you would need
> to do something like the following:
>
> iptables -t filter -A FORWARD -i eth0 -o eth0 -j ACCEPT
>
> Or if you want to be more specific and specify what subnets can forward
> you would need the following rules:
>
> iptables -t filter -A FORWARD -i eth0 -o eth0 -s 192.168.3.0/24 -d
> 192.168.4.0/24 -j ACCEPT
> iptables -t filter -A FORWARD -i eth0 -o eth0 -s 192.168.4.0/24 -d
> 192.168.3.0/24 -j ACCEPT
>
>
>
> Grant. . . .
>
next prev parent reply other threads:[~2005-05-31 6:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-31 5:20 routing within same nic card Wennie V. Lagmay
2005-05-31 5:49 ` Taylor, Grant
2005-05-31 6:10 ` Wennie V. Lagmay [this message]
2005-05-31 6:31 ` Taylor, Grant
2005-05-31 6:51 ` Wennie V. Lagmay
2005-05-31 6:59 ` Taylor, Grant
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='00ca01c565a7$759eeaa0$d40aa8c0@winxp' \
--to=wlagmay@yanbulink.net \
--cc=gtaylor@riverviewtech.net \
--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