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?