I'm using OpenVPN on Ubuntu Server to connect to my VPN. That network interface is tun0. All traffic currently goes through the VPN. I'd like to exclude traffic that goes over a specific port, and have that traffic go through eth0, and not through the VPN. I know it's possible, but I don't have much networking experience, so I'm at a loss here. Any help is much appreciated.
You can use iptables + ip-route together to achieve this. The idea is, iptables "mangles" a specified packet by "marking it", and then later, the ip route rules can direct such marked packets to a different gateway, ie, interface. I found a concise and simple example for you: http://lartc.org/howto/lartc.netfilter.html The example is that you have two connections to the internet -- one fast, one slow, and they route mail (port 25) to the slow one.