Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-23-2003, 10:37 AM   #1
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 -j ACCEPT
iptables -A FORWARD -d -j ACCEPT
iptables -A FORWARD -s ! -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: (linux), (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
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
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 -j ACCEPT
iptables -A FORWARD -d -j ACCEPT
iptables -A FORWARD -s ! -j DROP


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 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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 PM.

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