LinuxQuestions.org
Visit Jeremy's Blog.
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, 11: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 11:39 AM.
 
Old 08-23-2003, 11: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


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

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

All times are GMT -5. The time now is 09:34 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
Open Source Consulting | Domain Registration