I found this solution and it seems to work. But I don't know if it's safe?

ifconfig eth1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0

modprobe ipt_MASQUERADE
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward