LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-22-2008, 10:51 AM   #1
jp-lack
Member
 
Registered: Mar 2005
Location: NJ - US
Distribution: Slackware
Posts: 93

Rep: Reputation: 15
OpenVPN: not redirecting http traffic


Hi

I have set up a openvpn server which seems to be running fine; however, when the client connects it wont redirect the traffic for HTTP/FTP

I was reading around and seems like I had to add 'redirect-gateway def1' into server.conf -- I did that but now when the client connects it losses connection with everything but the vpn server

Code:
Wed Oct 22 10:39:48 2008 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,route 10.8.0.1,ping 10,ping-restart 120,ifconfig 10.8.0.10 10.8.0.9'
Wed Oct 22 10:39:48 2008 OPTIONS IMPORT: timers and/or timeouts modified
Wed Oct 22 10:39:48 2008 OPTIONS IMPORT: --ifconfig/up options modified
Wed Oct 22 10:39:48 2008 OPTIONS IMPORT: route options modified
Wed Oct 22 10:39:48 2008 TUN/TAP device tun0 opened
Wed Oct 22 10:39:48 2008 /sbin/ip link set dev tun0 up mtu 1500
Wed Oct 22 10:39:48 2008 /sbin/ip addr add dev tun0 local 10.8.0.10 peer 10.8.0.9
Wed Oct 22 10:39:48 2008 /sbin/ip route add 69.72.210.186/32 via 192.168.1.1
Wed Oct 22 10:39:48 2008 /sbin/ip route add 0.0.0.0/1 via 10.8.0.9
Wed Oct 22 10:39:48 2008 /sbin/ip route add 128.0.0.0/1 via 10.8.0.9
Wed Oct 22 10:39:48 2008 /sbin/ip route add 10.8.0.1/32 via 10.8.0.9
Wed Oct 22 10:39:48 2008 Initialization Sequence Completed
I can ping 10.8.0.1 and 69.72.210.186 when connected -- but thats it; I cant ping nothing else

Any ideas?

Thanks,
 
Old 10-22-2008, 02:31 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Is the server properly set up to route packets? (ip_forwarding and, if necessary, NAT)?
 
Old 10-22-2008, 05:55 PM   #3
jp-lack
Member
 
Registered: Mar 2005
Location: NJ - US
Distribution: Slackware
Posts: 93

Original Poster
Rep: Reputation: 15
yeah i have /proc/sys/net/ipv4/ip_forward set to 1

the client gets the IP and can ping the server

If i restart the openvpn server without "redirect-gateway def1" the client wont lose the connectivity but the http traffic will be from the default source IP

is there any iptable rules i have to add?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Traffic shaping (limiting outgoing bandwidth of all TCP-traffic except FTP/HTTP) ffkodd Linux - Networking 3 10-25-2008 12:09 AM
redirecting traffic Tareq85 Linux - Networking 1 05-28-2008 03:47 PM
dout in iptable redirecting http traffic? Santoshkb Linux - Networking 7 09-17-2007 01:28 PM
how to find http traffic and mail traffic alone? basbosco Linux - General 1 06-07-2005 10:29 PM
redirecting vpn traffic brb5548 Linux - Networking 1 07-01-2003 01:13 PM


All times are GMT -5. The time now is 11:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration