Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have setup openvpn on Centos and its working like a charm for me ..but my problem is when my client connects to vpn all traffic start going through my VPN tunnel over internet which I dont want, Is there any way I could route my traffic towards 202.125.128.204 only through VPN...rest of the traffic should go through my DSL GATEWAY
Server.conf
port 1194
proto udp
dev tun0
ca keys/server/ca.crt
cert keys/server/server.crt
key keys/server/server.key
dh keys/server/dh1024.pem
server 10.66.77.0 255.255.255.0
crl-verify keys/server/crl.pem
cipher none
user nobody
group adm
status servers/changeme/logs/openvpn-status.log
log-append servers/changeme/logs/openvpn.log
verb 2
mute 20
max-clients 100
keepalive 10 120
client-config-dir /etc/openvpn/servers/changeme/ccd
persist-key
persist-tun
ccd-exclusive
push "route 192.168.168.0 255.255.255.0"
push "redirect-gateway def1"
Thanks for reply, I have tried your suggested way, by removing "rediredt..." option..in that case im not able to route my traffic for 202.125.128.204 through vpn tunnel over internet...let me tell you that my vpn client get ip from 10.x.x.x subnet....I need a through which I only route traffic comming for 202.125.128.204 through vpn tunnel,,,rest of the internet traffic should not be pass through my vpn server and it should go through by client own dns gateway
okay so you say by just pusing route for 202.125.128.204...vpn server would only route traffic through tunnel for this ip and rest of the traffic would not come through tunnel ..is that correct????
If thats the scene then this is exactly what i want...ill try and will get back to you
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.