Ubuntu SMB & OpenVPN - VERY slow transfer

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
ryanrazer
OpenVpn Newbie
Posts: 10
Joined: Sat Mar 03, 2018 12:57 pm

Ubuntu SMB & OpenVPN - VERY slow transfer

Post by ryanrazer » Fri Jun 01, 2018 5:25 pm

Hey, another question

Just earlier today i posted a question because i had issues with slow transfer speeds. I decided to make a new test server (i need it for work btw) and when i figure out whats up, i'll apply changes to main server.

So, i was using TCP protocol and high security (encryption). Thought that that was the issue, i switched to blowfish instead of aes, UDP protocol and without tls-auth.
However when i've set up this new test server i was greeted with unpleasant surprise of the same performance :/

If i copy files on the server, from 1 folder to another (same computer, even same disk for that matter) the performance is horrible. I was able to download files to remote client with higher speed. Is that an Ubuntu issue, SMB or OpenVPN one?! :roll: :?:

Video representation: https://youtu.be/X174SiokdJQ (Copy from remote host, files are on the server, copy from 1 folder to another within same computer, same disk drive).

Hope for any suggestions,
TNX
Ryan
Last edited by ryanrazer on Fri Jun 01, 2018 5:34 pm, edited 1 time in total.

ryanrazer
OpenVpn Newbie
Posts: 10
Joined: Sat Mar 03, 2018 12:57 pm

Re: Ubuntu SMB & OpenVPN slow transfer

Post by ryanrazer » Fri Jun 01, 2018 5:28 pm

Added Server conf:
SERVER

#added as suggested somewhere
sndbuf 3399999
rcvbuf 3399999
push "sndbuf 3399999 "
push "rcvbuf 3399999 "

port xxxx
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem

# Network topology
# Should be subnet (addressing via IP)
# unless Windows clients v2.0.9 and lower have to
# be supported (then net30, i.e. a /30 per client)
# Defaults to net30 (not recommended)
;topology subnet

server 11.9.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt

# Configure server mode for ethernet bridging.
# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface. Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume 10.8.0.4/255.255.255.0. Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients. Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

# Configure server mode for ethernet bridging
# using a DHCP-proxy, where clients talk
# to the OpenVPN server-side DHCP server
# to receive their IP address allocation
# and DNS server addresses. You must first use
# your OS's bridging capability to bridge the TAP
# interface with the ethernet NIC interface.
# Note: this mode only works on clients (such as
# Windows), where the client-side TAP adapter is
# bound to a DHCP client.
;server-bridge

# Push routes to the client to allow it
# to reach other private subnets behind
# the server. Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"

# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# or bridge the TUN/TAP interface to the internet
# in order for this to work properly).
;push "redirect-gateway def1 bypass-dhcp"

# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses. CAVEAT:
# http://openvpn.net/faq.html#dhcpcaveats
# The addresses below refer to the public
# DNS servers provided by opendns.com.
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"

# Uncomment this directive to allow different
# clients to be able to "see" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
;client-to-client

# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names. This is recommended
# only for testing purposes. For production use,
# each client should have its own certificate/key
# pair.
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

keepalive 10 120

;tls-auth ta.key 0 # This file is secret

# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES

# Enable compression on the VPN link.
# If you enable it here, you must also
# enable it in the client config file.
comp-lzo

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
# You can uncomment this out on
# non-Windows systems.
user nobody
group nogroup

# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Ubuntu SMB & OpenVPN - VERY slow transfer

Post by TinCanTech » Fri Jun 01, 2018 5:49 pm

ryanrazer wrote:
Fri Jun 01, 2018 5:25 pm
If i copy files on the server, from 1 folder to another (same computer, even same disk for that matter) the performance is horrible
I am struggling to understand .. how is openvpn involved ?

Please see:
HOWTO: Request Help !

Start here:
HOWTO: For OpenVPN Community Edition

ryanrazer
OpenVpn Newbie
Posts: 10
Joined: Sat Mar 03, 2018 12:57 pm

Re: Ubuntu SMB & OpenVPN - VERY slow transfer

Post by ryanrazer » Fri Jun 01, 2018 6:05 pm

i don't know. maybe it isn't. i have no idea, that's why i am posting here. maybe data is going from server to client and back to server to folder next to the original one. i have no idea...

Maybe some one can confirm it is a Ubuntu or SMB or OpenVPN problem. If someone has experienced this issue before. i don't know where to look, to pinpoint the issue. Once you know what the issue is, you can search for solution. But in this case i don't even know what is causing the slowdowns... :/

mattheww@thereachagency.com
OpenVpn Newbie
Posts: 2
Joined: Wed Jul 18, 2018 2:23 am

Re: Ubuntu SMB & OpenVPN - VERY slow transfer

Post by mattheww@thereachagency.com » Wed Jul 18, 2018 2:30 am

Same experience here. Max data transfer rate I can get is 400K. And I've already tweaked the sndbuf and rcvbuf in the openvpn_as.conf. I'm searching for causes and seeing if I can get it fixed.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Ubuntu SMB & OpenVPN - VERY slow transfer

Post by TinCanTech » Wed Jul 18, 2018 2:50 am


Post Reply