LinuxQuestions.org
Help answer threads with 0 replies.
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 06-20-2006, 09:25 PM   #1
luckythedonkey
LQ Newbie
 
Registered: Aug 2005
Location: Australia
Posts: 16

Rep: Reputation: 0
Problem with IP forwarding


Hi guys,

I'm having a small problem getting IP forwarding working at home. Here's my setup.

* Wireless adsl router with public dhcp ip of 203.x.x.x as my gateway with internal IP of 192.168.0.1.

* FC5 box using eth1 (wireless) static IP of 192.168.0.5 NAT'd out to the web with gateway of 192.168.0.1. eth0 (ethernet) has a static IP of 192.168.100.1. IP forwarding is enabled.

* RHEL4 box with eth0 (ethernet) configured with static IP of 192.168.100.2. It's connected to the FC5 eth0 port by cross-over cable to get internet access. Gateway is set to 192.168.100.1.

The systems can ping each other no problems and I can even ping my dsl router from the EL4 box but I can't get any internet connection. I've tried static routes and a few other things but it appears my FC5 box isn't forwarding internet data from eth1 to eth0. I have a feeling having my data nat'd to the web might be confusing my boxes a bit.

I can configure my FC5 box to obtain a dhcp ip from my dls router if this is required but I haven't actually done this yet.

Does anyone have any suggestions?


Thanks
Justin
 
Old 06-21-2006, 04:02 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Sounds like you might need to bridge eth0 to eth1 on the FC5 box. Unfortunately I've never done this and have no idea how to but it sounds like that's what you need.

Try these:

Network Bridging
Bridging

Hope that helps
 
Old 06-21-2006, 04:06 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
IF the RHEL4 box is getting through with a ping to the adsl router, then forwarding is setup correctly, otherwise the ping would not be able to get back to the host sending it, it sounds it sounds like a DNS issue. Have you pointed the RHEL4 box DNS settings to the FC5 box, and then set the FC5 box DNS settings to the adsl router?
 
Old 06-21-2006, 04:50 AM   #4
luckythedonkey
LQ Newbie
 
Registered: Aug 2005
Location: Australia
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the response.

I don't think it's a DNS issue. The only reason I can ping the dsl router is because the FC5 box and my RHEL4 box are in the same IP range (i.e. 192.168.100.0 & 192.168.0.0). If I change eth0 to a different range (e.g. 10.0.0.0) and do the same with my EL4 box, I can't ping the dsl router anymore.

I've tried pinging the ip of certain websites and I get no response so I really don't think it's a dns issue.

Thanks for the bridging info, I'll have a look into that.


Thanks.
Justin
 
Old 06-21-2006, 04:53 AM   #5
intel_ro
Member
 
Registered: Jun 2006
Location: Romania
Distribution: RH 9, FD 2,3,4,5 Debian
Posts: 37

Rep: Reputation: 15
your problems is that dsl router don't know were to route 192.168.100.* ip u need to add static route on dsl router to route 192.168.100.* tru 192.168.0.5 .. and u must have in /ect/sysctrl.conf ip_forward = 1 .. u can test with tcpdump and u will se the icmp on that interface 192.168.0.5 but no response from dsl becuse he don't know were to return pakets an dsl router will use defaul gateway , your real ip gateway

if your dsl router can't use static route u can use on FC5 box iptables
iptables -t nat -A PREROUTING -s 192.168.100.0/24 -j SNAT --to-source 192.168.0.5 and u will get response from router

Last edited by intel_ro; 06-21-2006 at 05:56 AM.
 
Old 06-21-2006, 07:51 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Why not use DHCP?

You can still have fixed IP addresses by assigning them on the router (I am assuming it can function as a DHCP server). Even with only 2 add'l boxen on your LAN, I think it's slightly easier to admin. everything at the router.
 
Old 06-21-2006, 09:00 AM   #7
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
intel_ro maybe right, The adsl router may not know how to get back to the 192.168.100.0 network

Also 192.168.100.0 and 192.168.0.0 are two differnet class C networks

Last edited by fotoguy; 06-21-2006 at 09:20 AM.
 
Old 06-22-2006, 12:32 AM   #8
luckythedonkey
LQ Newbie
 
Registered: Aug 2005
Location: Australia
Posts: 16

Original Poster
Rep: Reputation: 0
What intel_ro said makes sense to me. That's most likely the problem.

using DHCP will most likely work too. Thanks a lot for your help guys!
 
  


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
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
port forwarding problem bruj3w Linux - Networking 3 08-13-2004 08:13 PM
port forwarding problem syrtsardo Linux - Networking 6 07-19-2004 01:50 AM
Yet another IP Forwarding Problem Louie55 Linux - Networking 4 02-20-2004 11:15 AM
port forwarding problem roueleader Linux - Newbie 9 06-11-2002 04:44 PM

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

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