I have a feeling this isn't just an OpenVPN question but I hope some kind soul will give me a pointer to the right direction as I'm a bit stumped.
Background:
I have three machines: server, client and dumb terminal. The server and client are connected with OpenVPN tunnel. The client is acting as a gateway for dumb terminal.
The server is an Ubuntu (12.04) box. The client is Os X and the dumb terminal is a PS3.
Goal:
I want to route the dumb terminal's traffic through the tunnel but I want the client's traffic to go elsewhere (en1). The reason for this is that I have limited bandwidth allowance on the server.
Current state of affairs:
In my current configuration I can route everything from client and dumb terminal through the tunnel and it works as expected. To achieve this I've executed:
/usr/sbin/natd -a 192.168.2.2 -n tun0 -dynamic -s -m -u -clamp_mss -enable_natportmap -natportmap_interface en1
/sbin/ipfw add 00100 divert natd all from any to any via tun0
The dumb terminal is configured so that its gateway is the client. Once I open the VPN connection, all the traffic from the dumb terminal is correctly redirected via the tunnel. However I'd prefer not to send the client's traffic through the VPN.
server.conf
proto tcp-server
port 1194
dev tun
secret openvpn.key
ifconfig 192.168.2.1 192.168.2.2
keepalive 10 120
comp-lzo
persist-key
persist-tun
status server-tcp.log
log openvpn.log
verb 3
client.conf
dev tun
proto tcp-client
remote address_of_server 1194
connect-retry-max 1
connect-timeout 60
resolv-retry 1
nobind
secret openvpn.key
comp-lzo
verb 6
ifconfig 192.168.2.2 192.168.2.1
dhcp-option DNS trusted_dns_server_ip
redirect-gateway def1
socks-proxy localhost 9090
route ip_of_server 255.255.255.255 net_gateway
I've tried disabling redirect-gateway in the client configuration. The tunnel opens just fine, and I can ping the server from the client, but for some reason none of my traffic gets tunnelled through the VPN after that.
So, gents and ladies, what further commands do I need to execute to connect the dumb terminal to the VPN?