3

I coudn't manage to set up basic ip forwarding on OSX Yosemite 10.10.1 Mac-Mini.

I use the exact same configuration on a OSX Mavericks 10.9.5 Mac-Mini, and it's working perfectly ?

I set the

sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet6.ip6.forwarding=1
sudo sysctl -w net.inet.ip.fw.enable=0

I use two interfaces

one on network with gateway to internet en0 :

ip 192.168.7.7 
gateway : 192.168.7.254 

one for local purpose only en5 (usb to ethernet)

ip 192.168.54.254
gateway : self

I configure a DHCP on the en5 for delivering ip

192.168.54.0/24

I configure static route on my routeur (192.168.7.254)

Destination 192.168.54.0/24 -> 192.168.7.7

When a device is connected on the en5 interface

  • they get a good ip from dhcp (192.168.54.x)
  • they can ping en5 interface

    ping 192.168.54.254 // ok

  • they can ping en0 interface

    ping 192.168.7.7 // ok

  • But i couldn't achieve to contact any other machine on the 192.168.7.x network, or any ip from outside.

    ping 192.168.7.254 // timeout

Here is my route table

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.7.254      UGSc           45        0     en0
default            link#5             UCSI            0        0     en5
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              3      805     lo0
169.254            link#4             UCS             0        0     en0
169.254            link#5             UCSI            0        0     en5
192.168.6/23       link#4             UCS             5        0     en0
192.168.6.41       b8:27:eb:4:a6:63   UHLWI           0        1     en0    751
192.168.7.3        0:11:32:2:e0:4b    UHLWI           0       82     en0    574
192.168.7.7/32     link#4             UCS             0        0     en0
192.168.7.13       14:10:9f:e1:7a:cb  UHLWIi          3     6587     en0    170
192.168.7.70       4c:72:b9:64:1:f6   UHLWI           0        1     en0   1072
192.168.7.75       10:9a:dd:4b:a3:16  UHLWI           0        0     en0    662
192.168.7.254/32   link#4             UCS             2        0     en0
192.168.7.254      0:50:7f:3a:31:c7   UHLWIir        46        3     en0   1151
192.168.54         link#5             UCS             1        0     en5
192.168.54.1       a8:20:66:15:50:74  UHLWIi          1        9     en5    167
192.168.54.254/32  link#5             UCS             0        0     en5

PF is disable

Once again i have the exact same configuration on a mac mini on OS 10.9.5 and it's working, ip forwarding have the classic behavior....

Thanks for help.

  • Do your machines in 192.168.54.0/24 have a route telling them how to get to 192.168.7.0/24? – devicenull Dec 3 '14 at 1:20
  • Machine in 192.168.54.0/24 have 192.168.54.254 as gateway, and you can see in route tables 192.168.6/23 -> link#4 -> UCS -> en0 on the 192.168.54.254 machine – rubijn Dec 3 '14 at 11:03
  • Executing man sysctl I see this "COMPATIBILITY The -w option has been deprecated and is silently ignored." – rstackhouse May 14 '15 at 20:38

Your Answer

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

Browse other questions tagged or ask your own question.