Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need help with a problem. My setup is:

  1. CentOS (Router) eth1 18.0.168.1 255.255.248.0 eth2 145.165.34.1 255.255.254.0

  2. Windows Server 2008 18.0.168.2

My problem is from the Windows machine, I can't get to the 145.165.34.0/23 network. I will be using that network for DHCP later.

Things I have tried which I am sure I am not doing it correctly are iptables forwarding, and ip route. For now I took those settings out.

Right now, 18.0.168.2 (Windows) can ping 18.0.168.1 (CentOS), but not 145.165.34.1.

Thanks if you can help.

[kyle@router ~]$ ip route list
10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15  metric 1 
145.165.34.0/23 dev eth2  proto kernel  scope link  src 145.165.34.1  metric 1 
18.0.168.0/21 dev eth1  proto kernel  scope link  src 18.0.168.1  metric 1 
default via 10.0.2.2 dev eth0  proto static 
===========================================================================
Interface List
 13 ...08 00 27 85 23 ea ...... Intel(R) PRO/1000 MT Desktop Adapter #2
 10 ...08 00 27 a2 2c 54 ...... Intel(R) PRO/1000 MT Desktop Adapter
  1 ........................... Software Loopback Interface 1
 11 ...00 00 00 00 00 00 00 e0  isatap.{52742097-8F78-484C-BF9E-D51D32CB1CA2}
 12 ...02 00 54 55 4e 01 ...... Teredo Tunneling Pseudo-Interface
 14 ...00 00 00 00 00 00 00 e0  isatap.{6DC0C149-3D90-43A0-952F-64C4C749F785}
 15 ...00 00 00 00 00 00 00 e0  6TO4 Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       18.0.168.1       18.0.168.2    266
          0.0.0.0          0.0.0.0         10.0.2.2        10.0.2.15     10
         10.0.2.0    255.255.255.0         On-link         10.0.2.15    266
        10.0.2.15  255.255.255.255         On-link         10.0.2.15    266
       10.0.2.255  255.255.255.255         On-link         10.0.2.15    266
       18.0.168.0    255.255.248.0         On-link        18.0.168.2    266
       18.0.168.2  255.255.255.255         On-link        18.0.168.2    266
     18.0.175.255  255.255.255.255         On-link        18.0.168.2    266
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link        18.0.168.2    266
        224.0.0.0        240.0.0.0         On-link         10.0.2.15    266
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link        18.0.168.2    266
  255.255.255.255  255.255.255.255         On-link         10.0.2.15    266
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0       18.0.168.1  Default
===========================================================================
IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
 15   1110 ::/0                     2002:c058:6301::c058:6301
  1    306 ::1/128                  On-link
 12     18 2001::/32                On-link
 12    266 2001:0:4137:9e76:2810:2820:f5ff:fdf0/128
                                    On-link
 15   1010 2002::/16                On-link
 15    266 2002:1200:a802::1200:a802/128
                                    On-link
 13    266 fe80::/64                On-link
 10    266 fe80::/64                On-link
 12    266 fe80::/64                On-link
 10    266 fe80::5d8:1b7d:9d92:8306/128
                                    On-link
 12    266 fe80::2810:2820:f5ff:fdf0/128
                                    On-link
 13    266 fe80::70c3:f7f:15fe:8c38/128
                                    On-link
  1    306 ff00::/8                 On-link
 12    266 ff00::/8                 On-link
 13    266 ff00::/8                 On-link
 10    266 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None
C:\Users\Administrator>
share|improve this question

migrated from stackoverflow.com Jun 23 '12 at 6:37

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

Based on the question, it looks like IP forwarding is not enabled.

To enable forwarding, edit the appropriate line in /etc/sysctl.conf like this:

net.ipv4.ip_forward = 1

You can enable it immediately for testing like this (as root):

echo "1" > /proc/sys/net/ipv4/ip_forward

If this doesn't solve the problem, please include the routing table and iptables rules from your linux server, and the routing table on the windows server

EDIT

You need to delete this route in Windows

0.0.0.0          0.0.0.0         10.0.2.2        10.0.2.15     10

Windows will choose the route with the lowest metric first, and that default is overriding the other default.

share|improve this answer
    
That actually isn't my problem. I already edited /etc/sysctl.conf. I forgot to mention it. Thanks though. –  leeman24 Jun 23 '12 at 19:31
    
Please include the routing table and iptables rules from the linux server, as well as the routing table from the windows server –  Mike Pennington Jun 23 '12 at 20:00
    
What gateway do you have configured in the Windows Box? –  diegows Jun 24 '12 at 15:58
    
I updated with the routing table. And the iptables rules are default. I even had them flushed for testing but didn't save. –  leeman24 Jun 24 '12 at 18:17
    
My gateway is 18.0.168.1 which is one of the Linux box's ip addresses –  leeman24 Jun 24 '12 at 18:17

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.