My problem is forward packets from eth2 that is my LAN to eth1 that has access to internet, to allow eth2 to access to internet, here my configuration:
auto eth1
iface eth1 inet static
address 192.168.3.1
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
gateway 192.168.3.254
auto eth2
iface eth2 inet static
address 10.101.26.1
netmask 255.255.0.0
network 10.101.0.0
broadcast 10.101.255.255
iptables configuration:
iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth2 -j ACCEPT
Already uncomment net.ipv4.ip forward=1 in /etc/sysctl.conf and write 1 in /proc/sys/net/ipv4/ip_forward.
If i test with a PC connected on LAN that have as gateway 10.101.26.1 I can't reach internet, so how I can solve this?
Thank you for any help! Regards