LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-06-2007, 07:45 AM   #1
FNC
Member
 
Registered: Feb 2001
Location: South Africa
Distribution: Fedora, Mandriva, PCLOS, SUSE - anything a can get my hands on
Posts: 140

Rep: Reputation: 15
ip forword not working


Hi,
I cant get ip forwarding to work on my Mandriva 2007 box. It has 2 nic's. One is connect to the internet and the other to the lan. All pc's on the lan has the linux's box ip as the default gateway. iptables is turned off.
I added FORWARD_IPV4=true to /etc/sysconfig/network
But i still cannot ping anything on the internet from the lan.
Here is my config files:

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ms01
FORWARD_IPV4=true
GATEWAY="196.25.73.1"

DEVICE=eth0
BOOTPROTO=static
IPADDR=172.25.15.5
NETMASK=255.255.255.0
ONBOOT=yes

IPADDR=196.25.73.2
NETMASK=255.255.255.0
GATEWAY=196.25.73.1
ONBOOT=yes
MS_DNS1=196.25.1.11
MS_DNS2=196.43.1.11


Any help would be appreciated.
 
Old 07-06-2007, 07:53 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Could you post the output of "/sbin/route"? Also, can you ping both the internet and LAN from the Mandriva host?

I once used my HP laptop to route wired LAN traffic from my Desktop to the wireless router. I had to "modprobe ip_conntrack" before forwarding would work. Do you also have a NAT router or do you need to do that in the Mandriva host?
 
Old 07-09-2007, 01:32 AM   #3
FNC
Member
 
Registered: Feb 2001
Location: South Africa
Distribution: Fedora, Mandriva, PCLOS, SUSE - anything a can get my hands on
Posts: 140

Original Poster
Rep: Reputation: 15
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
196.25.73.0 * 255.255.255.0 U 0 0 0 eth1
172.25.15.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 196.25.73.1 0.0.0.0 UG 0 0 0 eth1

I can ping both networks from the Linux box. I can ping the internet if i enable shorewall, but i dont want to use shorewall.
I think it is an firewall problem
 
Old 07-09-2007, 03:25 PM   #4
FNC
Member
 
Registered: Feb 2001
Location: South Africa
Distribution: Fedora, Mandriva, PCLOS, SUSE - anything a can get my hands on
Posts: 140

Original Poster
Rep: Reputation: 15
I'm sorry, I cannot ping the internet from the Lan even if I enable shorewall - so I guess it's not a firewall problem.
 
Old 07-12-2007, 06:13 AM   #5
FNC
Member
 
Registered: Feb 2001
Location: South Africa
Distribution: Fedora, Mandriva, PCLOS, SUSE - anything a can get my hands on
Posts: 140

Original Poster
Rep: Reputation: 15
Solved!!!!

Ok I got it working with:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
 
  


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
Ubuntu Feisty - Sound was working, but mysteriously stops working after reboot. woodsy934 Linux - Software 7 07-04-2011 06:39 PM
Fortemedia FM801 card not working under FC5 on Intel 845 but working with windows morningkiran Linux - Hardware 0 11-30-2006 07:57 AM
acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK Emmanuel_uk Linux - Laptop and Netbook 2 05-31-2006 01:41 AM
F1 - F10 not working when F13 - F20 working in Linux haivinay Linux - General 0 09-20-2004 07:31 AM
cannot download files in mozilla -save dialog not working, galeon not working cmisip Linux - General 0 08-03-2003 03:25 PM

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

All times are GMT -5. The time now is 09:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration