network – average command line to configure routing on mac and linux

My configuration:

  • PC: debian 9, 4.9.x kernel
    • ethernet eth1, 10 Gbit (PC <-> MAC)
  • MAC: mojave 10.14.1
    • en0, 1 Gbit Ethernet (MAC <-> l & # 39; Internet)
    • en6, 10 Gbit via Thunderbolt 3 (MAC <-> PC)

My goals are:

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

On both MAC and PC, I want to configure networking and routing via a command line. Currently, I have:

ifconfig eth1 inet 192.168.10.20 net mask 255.255.255.0

ip route add 192.168.10.0/24 dev eth1
ifconfig en0 inet 192.168.1.100 network mask 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

Tips for achieving the objectives described?