LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-26-2003, 11:19 AM   #1
Snabber
Member
 
Registered: Dec 2002
Posts: 76

Rep: Reputation: 15
Linux Home Gateway Problem


Hello, all. I am trying to set Redhat Linux 9.0 up as a gateway for my testbed network. Right now, the setup is like this:
Cable Modem---Lynksys Router/Firewall---Linux Machine---TestNet
###########################|_____________|
With the direct link between the Lynksys and the Testbed Network (marked with #), everything works fine. Linux and the testbed can access the internet. However, when I remove the link, I can no longer get Linux to access the internet. But it can still ping the Lynksys at 192.168.1.1. What is wrong??

Eric S.
PS: I'm sorry if this is the second time I posted this. My first totally disappeared.

Last edited by Snabber; 07-26-2003 at 11:21 AM.
 
Old 07-26-2003, 11:30 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It sounds like a routing problem. What do you get if you do:
route -n
ifconfig
 
Old 07-26-2003, 02:00 PM   #3
Snabber
Member
 
Registered: Dec 2002
Posts: 76

Original Poster
Rep: Reputation: 15
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1


eth0 Link encap:Ethernet HWaddr 00:10:B5:9E:86:4E
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63482 errors:0 dropped:0 overruns:0 frame:0
TX packets:31850 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:6050061 (5.7 Mb) TX bytes:1951231 (1.8 Mb)
Interrupt:11 Base address:0xb000

eth1 Link encap:Ethernet HWaddr 00:08:C7:08:F4:C4
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44339 errors:0 dropped:0 overruns:0 frame:0
TX packets:11185 errors:2 dropped:0 overruns:0 carrier:2
collisions:101 txqueuelen:100
RX bytes:11415672 (10.8 Mb) TX bytes:1310608 (1.2 Mb)
Interrupt:11 Base address:0x2400 Memory:40300000-40300038

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1692378 errors:0 dropped:0 overruns:0 frame:0
TX packets:1692378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:109714694 (104.6 Mb) TX bytes:109714694 (104.6 Mb)
 
Old 07-26-2003, 02:20 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you are going to have a LAN and a WAN side to your gateway then use 2 different subnets. Your routing will just get confused if not.
 
Old 07-26-2003, 02:30 PM   #5
Snabber
Member
 
Registered: Dec 2002
Posts: 76

Original Poster
Rep: Reputation: 15
I will soon connect directly to a cable modem, so I will have a public IP address. How can I fix the problem for now? If I wanted to use 10.1.x.x for my subnet, what would my netmask be? 255.255.0.0? How do I set this up???
 
Old 07-26-2003, 02:36 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
yes - and that is hoe you would set it up. Just change the ip info on the lan side and eth0.

Make sure eth1 is plugged into the linksys
 
Old 07-27-2003, 10:40 AM   #7
Snabber
Member
 
Registered: Dec 2002
Posts: 76

Original Poster
Rep: Reputation: 15
eth0 is externel and eth1 is internel. Now I have an even stranger problem. I can ping the IP address for yahoo.com. I can even port scan it with nmap. However, I can't resolve the domain and, even stranger, I can't get to the website, even when I type in it's IP address. The internel network and the Lynksys network work fine. However, I can make it work okay. I just have to turn my firewall off. Maybe it is a problem with not allowing fragments by accident?? I'll try to mess around with it.
 
Old 07-27-2003, 10:43 AM   #8
Snabber
Member
 
Registered: Dec 2002
Posts: 76

Original Poster
Rep: Reputation: 15
I fixed this problem by telling iptables to accept packets that are RELATED or ESTABLISHED and to accept fragments. Thanks for all your help!
 
Old 07-27-2003, 11:11 PM   #9
ThE_DeaD
LQ Newbie
 
Registered: Jul 2003
Posts: 24

Rep: Reputation: 15
how do i do this?
 
  


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
Home gateway + iptables kurrupt Linux - Security 2 08-08-2005 07:48 AM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM
Setting up a Home Network Gateway. Riddick Linux - Networking 2 06-16-2004 08:58 PM
Linux gateway problem Siggy Linux - Networking 3 11-25-2002 02:33 PM
Totally Frustrated Home Gateway Person Joe Kerrigan Linux - Networking 6 08-05-2002 11:04 AM

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

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