mtchang / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 0 forks source link

ifconfig IPv6 support (for OpenVPN) #970

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add IPv6 Options to openvpn config
e.g.:
<<<

### IPv6
# Enable TUN IPv6 module
tun-ipv6
server-ipv6 2001:xxxx:xxxx:xxxx::/64
push "route-ipv6 2001:xxxx:xxxx::/48"
# he 64 route
push "route-ipv6 2001:470:yyyy:yyyy::/64"

>>>

on the server and on the client:

<<<

tun-ipv6

>>>

2. start openvpn in console (to see log)
/usr/sbin/openvpn --cd /etc/openvpn/server --config server.conf

3. see error on client connect

What is the expected output? What do you see instead?
It should work.
Instead this Error shows up:

<<<

Mon Sep  2 21:30:24 2013 NOTE: the current --script-security setting may allow 
this configuration to call user-defined scripts
ifconfig: SIOCSIFADDR: File exists
Mon Sep  2 21:30:28 2013 Linux ifconfig inet6 failed: external program exited 
with error status: 1

>>>

What version of the product are you using? On what operating system?
RT-N56U_3.4.3.6-068_aria.zip on RT-N56U

Original issue reported on code.google.com by josef.schneider on 2 Sep 2013 at 7:36

GoogleCodeExporter commented 9 years ago
You needed enable IPv6 on tun interface first

Client
sysctl -w net.ipv6.conf.tun0.disable_ipv6=0

Server
sysctl -w net.ipv6.conf.tun1.disable_ipv6=0

I can add this code to "rc", when IPv6 is enabled. 

Original comment by andy.pad...@gmail.com on 4 Sep 2013 at 9:03

GoogleCodeExporter commented 9 years ago
Hmm, I try use IPv6 on -068 build. IPv6 enabled (6in4 from HE).

Set TUN encapsulation in main settings and add lines to custom conf

tun-ipv6
server-ipv6 2001:470:xxx:xxx::/64

OpenVPN server started w/o any errors, tun1 interface is configured IPv6 
address successfully.

Original comment by andy.pad...@gmail.com on 4 Sep 2013 at 9:20

GoogleCodeExporter commented 9 years ago

sysctl -w net.ipv6.conf.tun1.disable_ipv6=0

did the trick!
Thanks a lot!
What would be the best place to add this, so it gets run every boot and is not 
removed on firmware update?

Original comment by josef.schneider on 5 Sep 2013 at 9:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It should be 0 by default. Check it yourself, reboot the device, start openvpn 
server and do:
# cat /proc/sys/net/ipv6/conf/tun1/disable_ipv6
Anyway you will be able to do your 'trick' only after OpenVPN had been started, 
tup/tap driver had been initialized or you'll get the error message! So, even 
if it should be executed - it should be executed at the moment server starts...

Original comment by d...@soulblader.com on 15 Sep 2013 at 12:19