LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2003, 10:37 AM   #1
Amir
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat 9
Posts: 22

Rep: Reputation: 15
RedHat 9 Routing Help


I have a linux pc with 2 network cards in it. They both work, and i would like to share a cable internet connection with my other XP computer. This is my network:

cable internet -> (eth0) Linux machine (eth1)- > XP machine

now, i'm able to ping my xp machine no prob, and i have internet on my linux machine too. I used the "medium" firewall config when i first installed red hat 9. And I modified my iptables like this:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -s 10.0.0.0/24 -j ACCEPT
iptables -A FORWARD -d 10.0.0.0/24 -j ACCEPT
iptables -A FORWARD -s ! 10.0.0.0/24 -j DROP

I got this config from a redhat 8 book. I saved this config and restarted but i still don't have internet on my xp machine yet.

The ip addresses of my machines are: 10.0.0.10 (linux), 10.0.0.2 (xp)

What should i do? Am i missing something?

Any help would be appreciated.

Last edited by Amir; 08-23-2003 at 10:39 AM.
 
Old 08-23-2003, 10:51 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try enabling packet forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_dynaddr

If that doesn't work then try flushig nyour iptables and load your rules again:
iptables -F
iptables -F -t nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -s 10.0.0.0/24 -j ACCEPT
iptables -A FORWARD -d 10.0.0.0/24 -j ACCEPT
iptables -A FORWARD -s ! 10.0.0.0/24 -j DROP
 
  


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
Routing with Redhat 9.0 and Webmin Daryl Owen Linux - Newbie 1 01-27-2004 07:49 PM
Redhat 9 and DHCP/Routing Morthoseph Linux - Networking 7 04-26-2003 05:41 PM
does redhat 8.0-9.0 have routing or ICS? pantera6925 Linux - Networking 2 04-14-2003 01:19 PM
redhat 8.0 routing problem m_rodzen Linux - Networking 1 03-18-2003 09:47 PM
Routing in Redhat 7.1 laurad Linux - Networking 1 01-24-2002 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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