LinuxQuestions.org
Visit Jeremy's Blog.
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-24-2003, 04:53 PM   #1
lukas_z
LQ Newbie
 
Registered: Jul 2003
Location: Czech Republic
Distribution: Mandrake 9.1
Posts: 18

Rep: Reputation: 0
strange routing/IP forwarding behavior


Hi all,
i've got a linux box (Mandrake 9.1) acting as a server - it has 2 NICs, each of them is connected to a windoze client via a crossed UTP cable. There is also a modem in the linux box, and i am able to acces outside world from the clients (by means of NAT). Everything works fine, except one thing - the two clients don't see each other!
To be specific, i can e.g. ping both client boxes from the linux box, i can also ping the linux box from each client, and i can ping machines in the internet from the clients as well as from the server. But a ping sent from one client to another (ment to be forwarded throug the server) always time outs, as well as any other TCP/IP connection attempt.
This is not a matter of disabled IP forwarding (note that accessing the outside world from the clients works fine) as well as not iptables issue - clients don't see each other with iptables disabled...

Any clue?
 
Old 07-24-2003, 05:42 PM   #2
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
There's probably a better way, but in a router, I'd put this in the iptables script:


iptables -A FORWARD -i $LAN_NIC1 -o $LAN_NIC2 -j ACCEPT
iptables -A FORWARD -i $LAN_NIC2 -o $LAN_NIC1 -j ACCEPT
 
Old 07-25-2003, 02:44 AM   #3
lukas_z
LQ Newbie
 
Registered: Jul 2003
Location: Czech Republic
Distribution: Mandrake 9.1
Posts: 18

Original Poster
Rep: Reputation: 0
Hmmm it's still the same (actually i'd be kinda surprised if that worked, the FORWARD chain policy has been set to ACCEPT all the time). Anyway, thanks for your effort to help me je_fro...
Seems i gotta try tcpdump and see what's actually happening on the interfaces...
 
Old 07-25-2003, 10:10 AM   #4
lukas_z
LQ Newbie
 
Registered: Jul 2003
Location: Czech Republic
Distribution: Mandrake 9.1
Posts: 18

Original Poster
Rep: Reputation: 0
So, the problem has been solved. I assigned both clients IPs within the same subnetwork (192.168.1.X) and that was the problem - when a client wanted to send a packet to the other one, it logically did't know it should be send to the gateway (the linux box) and sent an ARP request instead (which, of course, could have not been answered). So i changed IP of one of the clients to 192.168.2.X and it works.
Thanks everyone for reading my post (and especially je_fro for trying to help).
 
  


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
apache with strange behavior dimc Linux - Software 5 11-07-2004 03:58 PM
Very Strange Behavior raysr Mandriva 4 08-31-2004 02:06 PM
Strange Behavior andrewb758 Linux - Hardware 5 08-31-2003 02:42 PM
strange behavior abhijit Linux - General 3 07-09-2003 11:25 PM
Strange DHCPcd behavior padukes Linux - Networking 0 03-17-2002 09:55 AM

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

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