LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-11-2004, 09:11 PM   #1
davidho3
LQ Newbie
 
Registered: Jul 2004
Location: U.S
Posts: 8

Rep: Reputation: 0
Unhappy How to enable packet forwarding


I setup a PC (with RedHat 9.2) as a router. I did the following procedures to enable route (packet forwarding)

1. edit /etc/sysctl.conf and net.ipv4.ip_forward = 1
2. edit /etc/sysconfig/network and FORWARD_IPV4=true

I have two ethernet interface (eth0 and eth1). I connected to eth0 to a host PC and eth1 to a wireless router (connect the cable internet).

host(pc) -- eth0 <---> eth1 -- wireless router -- cable Internet.

I ran /sbin/route and all the routes setup as expected. I tried ping from host to wireless router . I also turned on ethereal on eth0 and eth1. I captured packet received from eth0, but ICMP packet did not forward to eth1.

Questions,

1. Do I have to run more setup on my Linux router (Redhat PC)?
2. How can I debug the packet forwarding issues? I ran tcpdump and ethereal already, any more tools?

Thanks
 
Old 10-12-2004, 12:35 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
do you have the MASQUERADE rules in your iptables?
 
Old 10-12-2004, 11:45 AM   #3
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
iptables -A POSTROUTING -t nat -o eth1 -j SNAT --to <ip-of-your-eth1>

www.netfilter.org

sl mritch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
packet forwarding? one.eleven Linux - Networking 19 11-08-2006 04:35 AM
Packet and Port forwarding umeshbabu Linux - Networking 1 08-22-2005 12:43 AM
packet fragmentation in packet forwarding code cranium2004 Linux - Networking 0 05-16-2005 05:05 AM
Packet forwarding with Mandrake 9.2 Newb_Linux_Geek Linux - Networking 5 08-11-2004 09:36 PM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 11:37 AM

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

All times are GMT -5. The time now is 11:55 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