LinuxQuestions.org
Help answer threads with 0 replies.
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 06-14-2015, 07:54 AM   #1
pinaki
LQ Newbie
 
Registered: Jun 2015
Location: India
Distribution: Fedora 22
Posts: 7

Rep: Reputation: Disabled
OpenVPN clients have no internet access


I have installed a OpenVPN server in my Fedora Box. But when I connect to the VPN network from my Phone running Android L (Cyanogen Mod 12), I can access all local network resources but I cant connect to the internet.

Cant seem to figure what the problem is? Any suggestion is appreciated.

Here is the Open VPN config file (tun0 is the VPN interface)
Quote:
;local a.b.c.d
port 1194
;proto tcp
proto udp
;dev tap
dev tun
;dev-node MyTap
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;server-bridge
;push "route 192.168.10.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
;learn-address ./script
push "redirect-gateway def1"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
;duplicate-cn
keepalive 10 120
;tls-auth ta.key 0
;cipher BF-CBC
;cipher AES-128-CBC
;cipher DES-EDE3-CBC
comp-lzo
;max-clients 100
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
log-append /var/log/openvpn.log
verb 3
;mute 20
Routing table
Quote:
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 600 0 0 wlp16s0
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp16s0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp16s0
Thanks in Advance.
 
Old 06-14-2015, 10:01 AM   #2
brebs
Member
 
Registered: May 2013
Posts: 89

Rep: Reputation: Disabled
Are you wanting to access the Internet directly, or via the VPN connection?

You probably have not set up your VPN server to masquerade.

For "direct", remove this line:
Code:
push "redirect-gateway def1"
 
Old 08-27-2015, 02:11 PM   #3
pinaki
LQ Newbie
 
Registered: Jun 2015
Location: India
Distribution: Fedora 22
Posts: 7

Original Poster
Rep: Reputation: Disabled
Sorry for late reply.
brebs is right thanks. I needed to Masquerade. For more exhaustive treatment follow https://forums.openvpn.net/topic12708.html

Marking as solved.
 
  


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
[SOLVED] after openvpn upgrade, clients can access SOME lan machines but not others... ? psycroptic Linux - Networking 3 04-22-2013 08:42 PM
LXer: Internet & LAN Over VPN Using OpenVPN – Linux Server – Windows/Linux Clients LXer Syndicated Linux News 0 08-17-2011 03:20 AM
[SOLVED] PPPOE server access the internet clients fail to access the internet simbini Linux - Newbie 3 08-31-2010 12:37 AM
How does OpenVPN Linux server issues IP and netmask to OpenVPN clients on Windows XP pssompura Linux - Networking 0 12-24-2009 02:42 AM
IPTables is blocking my OpenVPN internet access! eponymous Linux - Security 2 01-23-2007 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration