Needed program:
Iptables

PC 1

system gateway = 192.168.2.1 (eth1)

Eth1: (connected to internet with configuration) 192.168.2.2 netmask 255.255.255.0

Eth0: (other PC connected to this port) 192.168.1.1 netmask 255.255.255.0  (with cross cable maybe)

other PC configuration : 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 dns 192.168.1.1

If system is configured to start with defined script below then second PC can be access to internet if it’s network address equals to 192.168.1.x and gateway is 192.168.1.1 and dns is 192.168.1.1