From: pa3gcu <pa3gcu@zeelandnet.nl>
To: "Chadha, Devesh" <devesh.chadha@lehman.com>,
linux-newbie list <linux-newbie@vger.kernel.org>
Subject: Re: 2 NIC cards not talking
Date: Wed, 21 Jan 2004 17:38:22 +0100 [thread overview]
Message-ID: <200401211738.22654.pa3gcu@zeelandnet.nl> (raw)
In-Reply-To: <5F84A09ECDD5D411973000508BE32470266024E7@exnyc07.lehman.com>
On Wednesday 21 January 2004 16:23, Chadha, Devesh wrote:
> Juan,
>
> Eth0 has the external assigned IP by my ISP. Eth1 has a 192.168.x.x ip
> address. Eth1 acts as the DHCP server for my LAN. My LAN is working fine. I
> can connect machines to the LAN and even connect one machine to another.
>
> But I cannot get eth1 to talk to eth0. I cannot connect the LAN to the
> internet nor connect to any internal machine from outside!!
Then you need "masquerading", in otherwords iptables or ipchains.
Also make sure /proc/sys/net/ipv4/ip_forward is set to "1"
Something like the following for iptables;
#!/bin/sh
iptables --flush # Flush all the rules in filter and nat tables
iptables --table nat --flush
iptables --delete-chain #chains that are not in default filter/nat table
iptables --table nat --delete-chain
# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward # Enables packet forwarding by kernel
This is a must for both examples.
Or the following with ipchains.
/sbin/ipchains -A forward -s 192.168.11.0/24 -j MASQ
Change to suit your subnet.
> Do I need to bridge the 2 NICs ???
No.
> Regards,
> Devesh
>
--
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.
Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2004-01-21 16:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-21 15:23 2 NIC cards not talking Chadha, Devesh
2004-01-21 16:38 ` pa3gcu [this message]
2004-01-21 16:47 ` Juan Facundo Suárez
-- strict thread matches above, loose matches on Subject: below --
2004-01-22 21:39 Chadha, Devesh
2004-01-23 0:52 ` chuck
2004-01-23 4:04 ` Beolach
2004-01-23 6:33 ` pa3gcu
2004-01-23 16:54 ` Ray Olszewski
2004-01-23 10:55 ` chuck
2004-01-22 13:52 Chadha, Devesh
[not found] <5F84A09ECDD5D411973000508BE32470266024F6@exnyc07.lehman.co m>
2004-01-22 5:56 ` Ray Olszewski
2004-01-22 2:31 Chadha, Devesh
2004-01-22 4:02 ` Beolach
2004-01-22 4:16 ` chuck
2004-01-22 4:28 ` Beolach
2004-01-22 4:32 ` Beolach
2004-01-22 21:23 ` chuck
[not found] <5F84A09ECDD5D411973000508BE32470266024F5@exnyc07.lehman.co m>
2004-01-22 1:35 ` Ray Olszewski
2004-01-22 0:32 Chadha, Devesh
2004-01-22 1:24 ` chuck
[not found] <5F84A09ECDD5D411973000508BE32470266024F2@exnyc07.lehman.co m>
2004-01-22 0:01 ` Ray Olszewski
2004-01-21 21:52 Chadha, Devesh
[not found] <5F84A09ECDD5D411973000508BE32470266024E7@exnyc07.lehman.co m>
2004-01-21 17:08 ` Ray Olszewski
2004-01-21 16:47 Chadha, Devesh
2004-01-21 15:13 Juan Facundo Suárez
2004-01-21 14:25 Chadha, Devesh
2004-01-21 21:44 ` chuck gelm net
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=200401211738.22654.pa3gcu@zeelandnet.nl \
--to=pa3gcu@zeelandnet.nl \
--cc=devesh.chadha@lehman.com \
--cc=linux-newbie@vger.kernel.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