You need to configure the machine as a gate. Close all but the pair of ports that were thrown out of the other machine. Inside there should be access to the Internet through NAT.
Dhcp works in the network, IP and other settings are issued, but the machine does not work as a gateway.
Maybe I'm not setting up the correct iptables or do I need to deliver something? Maybe there is an intelligent man for iptables for dummies?
In iptables, it was added:
iptables -t nat -A POSTROUTING -o внешний_интерфейс -j MASQUERADE Added to the appropriate file
FORWARD_IPV4=YES DHCPD issues as gate internal IP of the machine.
Solution found:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEiptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPTiptables -A FORWARD -i eth1 -o eth0 -j ACCEPTecho 1 > /proc/sys/net/ipv4/ip_forward edit /etc/sysctl.conf
change net.ipv4.ip_forward = 0 to net.ipv4.ip_forward = 1
thanks gecube for setup help