Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on Unraid NAS (Slackware) #26

Closed
raidersan opened this issue Aug 16, 2015 · 4 comments
Closed

Does not work on Unraid NAS (Slackware) #26

raidersan opened this issue Aug 16, 2015 · 4 comments

Comments

@raidersan
Copy link

Here is my log, it seems to be very similar to yours, I am not sure what you meant when you said that my routing seem be done differently on Unraid? I am clueless when it comes to routing but I am puzzled by that 172.17.42.1 address as my docker eth0 address is actually 172.17.0.68 (see me interfaces below)

Sun Aug 16 18:00:27 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec  1 2014
Sun Aug 16 18:00:27 2015 WARNING: file '/config/openvpn-credentials.txt' is group or others accessible
Sun Aug 16 18:00:27 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sun Aug 16 18:00:27 2015 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sun Aug 16 18:00:27 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Sun Aug 16 18:00:27 2015 UDPv4 link local: [undef]
Sun Aug 16 18:00:27 2015 UDPv4 link remote: [AF_INET]109.201.137.163:1194
Sun Aug 16 18:00:27 2015 TLS: Initial packet from [AF_INET]109.201.137.163:1194, sid=31a2bf87 ca03bcc8
Sun Aug 16 18:00:27 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sun Aug 16 18:00:27 2015 VERIFY OK: depth=1, C=DE, ST=Hesse-Nassau, L=Frankfurt, O=BTGuard, CN=BTGuard CA, [email protected]
Sun Aug 16 18:00:27 2015 VERIFY OK: depth=0, C=DE, ST=Hesse-Nassau, L=Frankfurt, O=BTGuard, CN=server, [email protected]
Sun Aug 16 18:00:27 2015 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sun Aug 16 18:00:27 2015 NOTE: --mute triggered...
Sun Aug 16 18:00:27 2015 4 variation(s) on previous 3 message(s) suppressed by --mute
Sun Aug 16 18:00:27 2015 [server] Peer Connection Initiated with [AF_INET]109.201.137.163:1194
Sun Aug 16 18:00:29 2015 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Sun Aug 16 18:00:29 2015 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 8.8.8.8,redirect-gateway,route 10.10.10.1,topology net30,ping 10,ping-restart 120,ifconfig 10.10.10.158 10.10.10.157'
Sun Aug 16 18:00:29 2015 OPTIONS IMPORT: timers and/or timeouts modified
Sun Aug 16 18:00:29 2015 NOTE: --mute triggered...
Sun Aug 16 18:00:29 2015 3 variation(s) on previous 3 message(s) suppressed by --mute
Sun Aug 16 18:00:29 2015 ROUTE_GATEWAY 172.17.42.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:11:00:44
Sun Aug 16 18:00:29 2015 TUN/TAP device tun0 opened
Sun Aug 16 18:00:29 2015 TUN/TAP TX queue length set to 100
Sun Aug 16 18:00:29 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sun Aug 16 18:00:29 2015 /sbin/ip link set dev tun0 up mtu 1500
Sun Aug 16 18:00:29 2015 /sbin/ip addr add dev tun0 local 10.10.10.158 peer 10.10.10.157
Sun Aug 16 18:00:29 2015 /etc/transmission/start.sh tun0 1500 1541 10.10.10.158 10.10.10.157 init
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to tun0 ip: 10.10.10.158
Generating transmission settings.json from env variables
STARTING TRANSMISSION
NO PORT UPDATER FOR THIS PROVIDER
Transmission startup script complete.
Sun Aug 16 18:00:29 2015 /sbin/ip route add 109.201.137.163/32 via 172.17.42.1
Sun Aug 16 18:00:29 2015 /sbin/ip route del 0.0.0.0/0
Sun Aug 16 18:00:29 2015 /sbin/ip route add 0.0.0.0/0 via 10.10.10.157
Sun Aug 16 18:00:29 2015 /sbin/ip route add 10.10.10.1/32 via 10.10.10.157
Sun Aug 16 18:00:29 2015 Initialization Sequence Completed

Here are my routes

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.10.10.157    0.0.0.0         UG    0      0        0 tun0
10.10.10.1      10.10.10.157    255.255.255.255 UGH   0      0        0 tun0
10.10.10.157    0.0.0.0         255.255.255.255 UH    0      0        0 tun0
109.201.137.163 172.17.42.1     255.255.255.255 UGH   0      0        0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0

and my interfaces

eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:44  
          inet addr:172.17.0.68  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:2456 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2226 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:557144 (557.1 KB)  TX bytes:489313 (489.3 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.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.10.10.158  P-t-P:10.10.10.157  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:381 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 B)  TX bytes:24787 (24.7 KB)
@haugene
Copy link
Owner

haugene commented Aug 16, 2015

Yeah, I was a little quick there. Compared to the log from your Rpi. But I get what you're saying about the 172.17.42.1 address. See the first section here https://docs.docker.com/articles/networking/ about the default docker0 interface. Also see the part about the --bip flag, maybe you could try to set it to 172.17.42.1/16 or try something else. See if that affects the interfaces or routing.

@raidersan
Copy link
Author

I have posted on Unraid forums to understand the network options under the platform, but the summary is that if I select Bridged network, I get port mapping but no docker0: interface with a 172.x.x.x address. If I select Host, apparently all ports are opened to the container. When I tried that I got an error with the routing:

Mon Aug 17 00:42:34 2015 /sbin/ip route add 109.201.137.162/32 via 192.168.1.1
RTNETLINK answers: File exists
Mon Aug 17 00:42:34 2015 ERROR: Linux route add command failed: external program exited with error status: 2
Mon Aug 17 00:42:34 2015 /sbin/ip route del 0.0.0.0/0
Mon Aug 17 00:42:34 2015 /sbin/ip route add 0.0.0.0/0 via 10.10.10.205
Mon Aug 17 00:42:34 2015 /sbin/ip route add 10.10.10.1/32 via 10.10.10.205
Mon Aug 17 00:42:34 2015 Initialization Sequence Completed
Mon Aug 17 01:42:32 2015 VERIFY OK: depth=1, C=DE, ST=Hesse-Nassau, L=Frankfurt, O=BTGuard, CN=BTGuard CA, [email protected]
Mon Aug 17 01:42:32 2015 VERIFY OK: depth=0, C=DE, ST=Hesse-Nassau, L=Frankfurt, O=BTGuard, CN=server, [email protected]
Mon Aug 17 01:42:32 2015 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Aug 17 01:42:32 2015 NOTE: --mute triggered...

Here are my interfaces in the Host network config:

docker0   Link encap:Ethernet  HWaddr 16:1e:a2:e1:41:2b  
          inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32841493 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47378638 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13224303911 (13.2 GB)  TX bytes:55014278125 (55.0 GB)

eth0      Link encap:Ethernet  HWaddr 30:85:a9:3c:b7:0a  
          inet addr:192.168.1.250  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:343137501 errors:0 dropped:438605 overruns:0 frame:0
          TX packets:275629568 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:357459835987 (357.4 GB)  TX bytes:243198159311 (243.1 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3804311 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3804311 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2135558821 (2.1 GB)  TX bytes:2135558821 (2.1 GB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.10.10.206  P-t-P:10.10.10.205  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:46463 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70223 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:5683711 (5.6 MB)  TX bytes:33364082 (33.3 MB)

veth11f7117 Link encap:Ethernet  HWaddr e6:b2:92:26:d3:56  
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2783 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1268 (1.2 KB)  TX bytes:228768 (228.7 KB)

veth167345c Link encap:Ethernet  HWaddr 16:1e:a2:e1:41:2b  
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:7744689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9234920 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:736270256 (736.2 MB)  TX bytes:11045301324 (11.0 GB)

vethb2043db Link encap:Ethernet  HWaddr 3a:6c:53:06:6b:49  
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:5817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9314 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1338553 (1.3 MB)  TX bytes:2295267 (2.2 MB)

@haugene
Copy link
Owner

haugene commented Aug 17, 2015

Bridgded mode is default for Docker, ref: https://docs.docker.com/articles/networking/#container-networking

Reading that section I also think it's weird that bridged mode wont give you the docker0 interface as docker0 is the bridge interface. Can you check the settings of your docker daemon? On ubuntu there's a file used by Upstart called /etc/default/docker that contains default parameters for the daemon. Maybe you could give it some other DOCKER_OPTS from the networking section.

This seems to be all about the docker daemon and its networking behavior on the Unraid system. You might have to do some digging and exploring of other docker networking options.

@raidersan
Copy link
Author

Apologies but I am swamped with family demands and travels! Here is the file, it's empty really:

bash-4.2# cat /etc/default/docker
## Set defaults used by the docker daemon
## These are flags passed after `docker -d`
#DOCKER_OPTS=

I am investigating a new docker after being told somebody had built a OpenVPN & (unfortunately) Deluge server, just to see differences with yours, but I think that the little time I could afford to look, it's clear that this image sets an IP and play with routing tables, not that I understand everything that is being done with those... Here is a link if you are interested in an alternative:

https://hub.docker.com/r/binhex/arch-delugevpn/

I am struggling to set it up but as soon as I get the config right I will report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants