LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-11-2015, 03:46 PM   #1
fritz44
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
openVPN on Raspberry Pi - Routing Issues


Hi all,

I'm fairly new to the whole Linux world and I hope you can help me out. My current project is a Raspberry Pi that acts as a VPN client for all devices connected to it over WiFi.

This is the planned setup:
- Eth0 - connected to the broadband router, establishes link to internet
- Wlan0 - established WiFi network for other devices to connect to
- openVPN client to establish VPN link; I want ALL traffic coming from Wlan0 to go through the VPN tunnel

This is my config setup:
Code:
client
remote MYVPN.com 1194 udp
remote MYVPN.com 443 tcp-client
pull
auth-user-pass auth.config
comp-lzo adaptive
ca ca.crt
dev tun
proto udp
tls-client
script-security 2
cipher AES-256-CBC
mute 10

route-delay 5
push "redirect-gateway def1"
resolv-retry infinite
# dhcp-renew
# dhcp-release
# persist-key
# persist-tun
remote-cert-tls server
mssfix
verb 3

log-append /var/log/openvpn-client.log
It establishes the VPN link, but somehow the routing is messed up. Connected devices are not able to access the net.

Here is the IP table:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.132.21.1     128.0.0.0       UG        0 0          0 tun0
0.0.0.0         10.0.1.1        0.0.0.0         UG        0 0          0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U         0 0          0 eth0
10.0.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
10.132.21.0     0.0.0.0         255.255.255.0   U         0 0          0 tun0
128.0.0.0       10.132.21.1     128.0.0.0       UG        0 0          0 tun0
162.220.220.26  10.0.1.1        255.255.255.255 UGH       0 0          0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
Where am I'm going wrong here? Any ideas?

Thank you for suggestions!!

Last edited by fritz44; 10-11-2015 at 03:48 PM.
 
Old 10-11-2015, 05:01 PM   #2
fritz44
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Oh and this is my ifconfig:

[CODE]
eth0 Link encap:Ethernet HWaddr b8:27:eb:e5:b5:b5
inet addr:10.0.1.200 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: 2002:c393:e1ce:0:ba27:ebff:fee5:b5b5/64 Scope:Global
inet6 addr: 2002:c393:e1ce:0:8ab5:68fd:da13:ce89/64 Scope:Global
inet6 addr: fe80::ba27:ebff:fee5:b5b5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:593 errors:0 dropped:0 overruns:0 frame:0
TX packets:704 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:196732 (192.1 KiB) TX bytes:106278 (103.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 B) TX bytes:480 (480.0 B)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.132.21.39 P-t-P:10.132.21.39 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:18819 (18.3 KiB)

wlan0 Link encap:Ethernet HWaddr 00:e0:4c:81:76:6d
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::59df:48ac:e811:2de1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1471 errors:0 dropped:840 overruns:0 frame:0
TX packets:190 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:58882 (57.5 KiB) TX bytes:132525 (129.4 KiB)
[/CODE|
 
  


Reply



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] OpenVPN (and I think Routing) tobylockyer Linux - Networking 10 06-01-2011 08:08 AM
OpenVPN routing. MheAd Linux - Networking 6 06-25-2010 12:35 PM
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
Error When converting Routing OpenVPN to bridge mode openvpn danmartinj Linux - Software 0 11-06-2009 09:23 AM
openVPN and routing issues mdkelly069 Linux - Networking 0 07-12-2004 12:19 PM

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

All times are GMT -5. The time now is 12:47 AM.

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