Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a machine C with two NICs, namely eth0 and eth1, with CentOS 4.9 installed on it. Also I have a machine A connecting to C through eth0 and a machine B connecting to C through eth1. Now I want machine A to be in a subnet (e.g. 192.168.3.0/24) and machine B to be in another subnet (e.g. 192.168.4.0/24) and they could communicate with each other.

                  eth0         eth1
Machine A <---------> Machine C <---------> Machine B
           ...3.0/24             ...4.0/24

According to the answer of my previous question about this problem, I configured my eth0 and eth1:

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.3.1
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet

/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.4.1
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet

And configure Machine A (Windows XP) with 192.168.3.10, 192.168.3.1(gw), and Machine B (windows 7) with 192.168.4.10, 192.168.4.1(gw). I have enabled ip forwarding on machine C. Now, I haven't added any routes or iptables rules. I could ping 192.168.3.10 from machine B, but not vice vesa. Am i missing some routing rules? If yes, how to add these rules?

Any suggestions or tutorials or howtos will be appreciated.

share|improve this question
    
Good question, well done. –  womble Aug 3 '11 at 9:20
add comment

2 Answers 2

up vote 1 down vote accepted

A quick test:

Control Panel -> Windows Firewall (under System and Security, if you do that sort of thing). In the left pane, click 'Turn Windows Firewall On/Off', then turn off the Firewall in the right pane.

If you can ping it then, great... you can turn it back on, and allow ping by using the directions at http://www.sysprobs.com/enable-ping-reply-windows-7.

If that doesn't work, another quick test would be to shutdown iptables, just for troubleshooting purposes, of course. Even if you don't remember messing with it, it's worth testing...

sudo /etc/init.d/iptables stop
share|improve this answer
    
Thanks very much. The problem is exactly what you've said. Great thanks to you. –  machinarium Aug 3 '11 at 10:56
add comment

The fact that one machine can successfully ping the other machine suggests that the router machine (C) is configured at least reasonably correctly -- IP forwarding works, and there's no default "reject" policy in the iptables configuration.

I'd be inclined to suspect a firewall setting on Machine B that makes it not respond to pings by default. I'm not Microsoft guru, though, so I don't know if that might be a default Windows 7 thing, or how to go about checking and fixing it, but presumably there's some config manager in there somewhere you can click around in.

If that doesn't seem to be bearing fruit, just make a sanity check on your iptables config by running iptables -L -n and making sure there are no rules in the FORWARD chain (some system config thing might have added them) and that the policy for that chain is, in fact, ACCEPT (this isn't good security practice, but we're not as far as "making it secure" yet, just "making it work"). If you're not confident interpreting the output, paste the output into your question and someone will give you the thumbs up.

share|improve this answer
    
Thanks, womble. You're so kind and patient to help me out. –  machinarium Aug 3 '11 at 10:58
    
Upvotes (and accepted answers) are appreciated in return. –  womble Aug 3 '11 at 11:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.