LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-24-2010, 03:04 AM   #1
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Rep: Reputation: 32
Routing


Dear All,

My Internet Router is on 64.1.1.1

I have 2 NICs in my Linux Box: (Firewall OFF)

Eth0 -> 64.1.1.2 and cross-cable connected to Internet Router (64.1.1.1)
Eth1 -> 192.168.1.1 Connected to switch hub

Default gateway of Eth0 is to Internet Router (64.1.1.1)

From Linux-Box.. I able to ping to internet(ie. ping 202.158.3.7)

Client PC: (Firewall OFF)
Default Gateway is 192.168.1.1

I am unable to ping to internet (ie. ping 202.158.3.7)

Could any body please advise.. what I missed?

thanks & regards
Winanjaya
 
Old 03-24-2010, 03:22 AM   #2
kainosnous
Member
 
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
If you are trying to forward packets from a client through your Linux box, you will need to enable forwarding

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
However, you may also want to use NAT to share the same IP address as your Linux box. You can do that with iptables. It might look similar to this:

Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic routing isn't done; static routing works for about 2 seconds for wireless gregorian Linux - Networking 7 02-19-2010 06:43 AM
Routing lulatsch Linux - Newbie 1 06-18-2009 01:49 AM
pre routing , post routing and qos support msridhar87 Linux - Networking 0 02-13-2009 05:37 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM
Routing Help ravinmiist Linux - Networking 2 01-14-2003 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration