0

My setup:

  • PC: debian 9, kernel 4.9.x
    • eth1, 10 Gbit ethernet (PC <-> MAC)
  • MAC: mojave 10.14.1
    • en0, 1 Gbit ethernet (MAC <-> internet)
    • en6, 10 Gbit via thunderbolt 3 (MAC <-> PC)

My goals are:

  • on MAC, have access to internet (via en0)
  • on MAC, have access to PC (via en6)
  • on MAC, share internet with PC (via en6)

Both on MAC and PC, I would like to setup networking and routing via command line, currently I have:

  • on PC
ifconfig eth1 inet 192.168.10.20 netmask 255.255.255.0

ip route add 192.168.10.0/24 dev eth1
  • on MAC
ifconfig en0 inet 192.168.1.100 netmask 255.255.255.0
ifconfig en6 inet 192.168.10.10 netmask 255.255.255.0

sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet.ip.fw.enable=1
route -n change -net 192.168.10.0/24 -interface en6

Any hints how to achieve described goals?

5
  • What is the problem? What does work so far? What doesn't? Have you tried to ping some host? What was the result? Commented Feb 23, 2019 at 18:47
  • MAC have access to internet and I am able to communicate between PC and MAC via 10 Gbit ethernet, but I am not sure how to share internet from MAC to PC.
    – Artur
    Commented Feb 23, 2019 at 20:19
  • 1
    You must look for NAT. I don't know how to do this on MacOS. Commented Feb 23, 2019 at 21:46
  • Maybe apple.stackexchange.com/q/192089 is of help. Commented Feb 23, 2019 at 21:48
  • Thanks for the hints. I managed to get it working using ui configurators... will try to figure out later how to get this done via command line.
    – Artur
    Commented Feb 23, 2019 at 23:16

0

You must log in to answer this question.

Browse other questions tagged .