2

I have simple task to do: I have wni7 with two nics.I want to connect another comp(osx) to win7 through second nic to connect it to internet.

  • I already changed the registry.
  • Win7 interface with 192.168.2.1 has no gateway set (no point to do that)
  • OSX interface with 192.168.2.2 has gateway set to 192.168.2.1
  • I do not add any routes on win7, every thing seems to be already there
  • network on second nic is detected as "undefined network" (probably effect of no gateway)
  • i can achieve any connectivity to internet from OSX only by enabling network connection sharing on nic with 192.168.2.1, but it enables NAT and I'm interested only in pure routing without nat(it's a setup for some research).
  • firewall is off.

It seems to me that win7 refuses to forward packets for some reason. Perhaps "undefined network" and NLA service is to blame, although i couldn't find any info about that.

Below ascii schematics of my setup:

internet<-->router(192.168.1.1)<-->(192.168.1.2) WIN7 (192.168.2.1)<-->(192.168.2.2)OSX

Thanks

1

Check that your router has a route to the 192.168.2.x network. Unless you can add one or it is able to discover it your out of luck. It needs a route to tell it to send traffic for 192.168.2.x through the Windows 7 machine acting as a router/gateway at 192.168.1.2.

Make sure routing is enabled on the WIndows 7 machine (do a ipconfig /all at the command prompt and check for a line that says IP Routing Enabled . . . . . . . : Yes.

If it is not enable you can change this by setting the value of the following registry key to 1: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter

  • This should have been the accepted answer. – guest-vm Mar 27 '18 at 7:05
0

You need to enable IP routing. Do this by setting the value of the following registry key to 1: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter Please verify that this is enabled.

Also, you definitely need to specify a default route on your router! How else should the router decide through which interface traffic to the outside should be sent? It needs this information in the routing table. So, please specify a default gateway on the outside interface. All packets whose destination address does not belong to any of the networks, your router currently is part of will then be sent to the default gateway (i.e. out into the Internet). Does that make sense?

  • Can you perhaps explain the reason, in detail with supporting documentation, that enabling IP forwarding to connected networks solves the author's problem? – Ramhound Dec 2 '15 at 14:19
  • I don't think that this is the right place for describing details of IP routing. If you need documentation on the registry key, I just found this page on Microsoft's site which describes this to some extent. Please understand that I am not fully sure that my answer can definitely solve the issue. Maybe it doesn't, but it's also not marked as the correct answer, yet. I think it's the purpose of this great site to propose solutions and the correct solution is then marked. I just want to help. And I think down-voting does not help here... – TomS Dec 3 '15 at 9:13
  • Well I don't find an incomplete answer to be helpful. Perhaps I am actually interested in the reason this key is the solution, understand the mechanics, that requires an explanation. This answer is for everyone in the community also. – Ramhound Dec 3 '15 at 11:12
  • 1
    What’s there not to understand? It’s the equivalent to net.ipv4.ip_forward and net.ipv6.conf.all.forwarding. Routing is simply disabled by default on Windows. – Daniel B Jul 9 '16 at 9:53
  • 1
    @DanielB the point is he's not answering the question. OP had said "I already changed the registry" so reiterating IPEnableRouter is unhelpful. OP can connect to internet from OS X through ICS of Windows 7, so default route of router must be correct. All in all this shows a lack of understanding of the question. – guest-vm Mar 27 '18 at 7:02
0

The easiest way to do that is simply to go to your "network connections" page, select both networks cards, make a right clic on it, and choose "Bridge Connection".

Normally that's enough for setup the forwarding and everything needed to share your connection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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