What to do with tun0 interface after connecting to server?

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
lolex
OpenVPN Power User
Posts: 52
Joined: Sun Jun 05, 2011 7:50 pm

What to do with tun0 interface after connecting to server?

Post by lolex » Sun May 26, 2013 12:22 am

Hello,

I am a new user of OpenVPN. I have successfully deployed it on my OpenWRT router according to these instructions http://wiki.openwrt.org/inbox/vpn.howto. Now my tun0 interface shows up:

Code: Select all

tun0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.0.0.6  P-t-P:10.0.0.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
I was thinking that everything will happen automatically and my whole Internet traffic will be routed through this interface and in consequence by my home router but it didn't happen. I tried to use the following command to set tun0 as a default interface but to no avail:

Code: Select all

route add default gw 10.0.0.6 tun0
Can you tell me what steps should I perform to be able to use this new virtual interface and see all shares in my LAN etc.?P

I got interested in VPN because I am going for a long business trip to a distant country and was looking for a way to do free VOIP calls to my friends in country.

lolex
OpenVPN Power User
Posts: 52
Joined: Sun Jun 05, 2011 7:50 pm

Re: What to do with tun0 interface after connecting to serve

Post by lolex » Sun May 26, 2013 2:52 pm

*BUMP* Anybody?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: What to do with tun0 interface after connecting to serve

Post by janjust » Mon May 27, 2013 3:08 pm

add

Code: Select all

redirect-gateway def1
to the client config ; also make sure IP masquerading is enabled on the server (openwrt?) side.

Post Reply