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 net mask

ip route add dev eth1
ifconfig en0 inet network mask
ifconfig en6 inet netmask

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

Tips for achieving the objectives described?