Noob help - Share internet connection over ethernet

I want to share the wireless Internet connection from my 1 rig to my second rig via an ethernet port. will this work:

On the gateway

  • Enable ip traffic forwarding:
    • Open /etc/sysctl.conf
    • Uncomment the line

COPY

net.ipv4.ip_forward=1
  • Reload using sudo sysctl -p /etc/sysctl.conf
  • Reconfigure ip_tables to allow NAT:
    • Download the attached file
    • Replace online_device with the name of the network device that provides the internet connection
    • Replace lan_device with the name of the network device that connects to the LAN
    • Run the script with sudo

On the client PC

Add the gateway PC as the default gateway using

COPY

sudo ip route del default
sudo ip route add default via <ip of gateway pc>

Add another DNS server to /etc/resolv.conf , for example

COPY

nameserver 8.8.8.8

thanks for any advice.