Set up ip forwarding on your Ubuntu machine:
Edit /etc/sysctl.conf, find these lines and uncomment them like this:
# Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1
Then do
service network restart
Then set the ip address of the ubuntu machine as your default gateway on the windows machine.
Haven't tested this but I think it should work.