1

I'm sorry to bother about this silly question, I found many and many answers on this topic but none of them work for me.

The Ubuntu 14.04 server's got both Openvpn and Samba. The client is a Windows 7 machine.

I'm building a new server to replace an old one (ubuntu 12). The configuration of the new is exactly the same as the old.

Windows 7 can connect to Openvpn and can ping it. The server sees a connected client ( cat /etc/openvpn/openvpn-status.log ) but can not ping it (don't really know why and I don't know if this could be a problem but I do not think so because the same is on the old server).

smb.conf:

[global]
    server string = %h server (Samba, Ubuntu)
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    deadtime = 45
    socket options = TCP_NODELAY IPTOS_THROUGHPUT
    dns proxy = No
    usershare allow guests = Yes
    panic action = /usr/share/samba/panic-action %d
    idmap config * : range =
    idmap config * : backend = tdb
    map acl inherit = Yes
    csc policy = documents
    interfaces = 10.8.0.0/24 tun0
    hosts allow = 10.8.0.0/24

Server's tun0 is 10.8.0.1 Windows 7 "TAP-Windows Adapter V9" is 10.8.0.6

And I try to connect to the share using \\10.8.0.1

No, without shared folder like \\10.8.0.1\shared because if you create a Windows shortcut you don't necessary need a share name. It will simply ask for credentials once, connected through vpn, you double click on it. (Method tested on old server)

The only open ports using UFW are for ssh and openvpn 1194/udp.

Useless to say that with the same configuration, I can connect to the old server and open the share while in the new server I just can't.

This is an example of one of the shares:

[User44]
    path = /home/samba/user44
    valid users = @user44
    force group = user44
    read only = No
    security mask = 0770
    directory mask = 0770
    write cache size = 2621440
    veto oplock files = /*.tmp/

If there is need of more information I'll be glad to provide them. I think that these are the ones one would promptly be asking for.

Thanks folks,

aPugLife
  • 157
  • windows tap - linux tun use same type of the device and reply if problem persist. – Ivan Temchenko Mar 07 '16 at 15:41
  • I thought that, but old server is using the same configuration. Actually, I'm connecting using the same TAP device I use for the old server. The openvpn conf of the new server is the one from the old, (I copied with filezilla) and it is tun. – aPugLife Mar 07 '16 at 15:44

1 Answers1

1

The only open ports using UFW are for ssh and openvpn 1194/udp. Missed this line. In order to work on any assigned interface, samba needs at lest one opened port SMB over TCP 445 tcp

More details: What ports does the Samba client require?

And VPN to server does not make you local user ) so:

sudo ufw allow from 10.8.0.0/24 to any port 445 proto tcp