Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to rsync outside of a VPN connection. I have a CentOS 6.4 machine that has an open VPN connection, that capable of roughly 10Mbps, whereas the WAN connection is 40Mbps. I'm trying to rsync from mirrors.usc.edu, and would obviously prefer to bypass the VPN connection.

rsync --address="IP address" --delay-updates -aq --delete --delete-excluded --exclude "local*" --exclude "isos" --exclude "i386" rsync://mirrors.usc.edu/centos/6.4/ /mount-point >> /var/log/rsync.log 2>&1

IP address is the server's NIC IP, not the VPN IP. It works fine when the VPN isn't connected. When it is connected, I get an error in the log:

rsync: failed to connect to mirrors.usc.edu: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]

Any suggestions on how this could be done? Specifically, I'm trying to pull with rsync while a VPN is connected, but not have it route down the VPN.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Edit: The below assumes you are using OpenVPN, the wording of your post is unclear as to whether you are using OpenVPN or you just have an 'open VPN' (just connected). If you aren't using OpenVPN, please explain how you are connecting to your VPN.

Find the IP of mirrors.usc.edu and add it to a route in your openvpn configuration on the client.

route 68.181.195.4 255.255.255.255 net_gateway

This will make the client route around the VPN to the net_gateway (that's a VPN keyword) and go directly.

If you aren't using OpenVPN, you should still be able to add an ip route that has higher priority than the VPN connection using your local network interface's gateway.

share|improve this answer
    
Ah, I didn't even notice that. Yes, that was bad wording on my part. I meant 'open' as in, 'connected'. However, yes, I am using OpenVPN (so hopefully that's not confusing). –  mhoughton125 Nov 11 '13 at 11:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.