Ubuntu server routing table
Solution 1:
If you can ping from one subnet to another, there's no problem in your routing table. Probably packets from local networks are being sent to Internet unmodified. The problem is that private network addresses are not routable through Internet.
Private network addresses must be NAT'ed before sent to Internet. Try running:
sudo iptables -t nat -A POSTROUTING -o p1p1 -j MASQUERADE