2

I'm running samba on a server, but I don't want samba directly exposed to the internet. The server is running pptpd, and I want samba to bind to the local ip of the pptpd, so samba will be accessible over the tunnel only and will be somewhat encrypted

I've added the following in /etc/pptpd.conf:

localip 10.10.0.1
remoteip 10.10.0.100-200

I've added the following in /etc/samba/smb.conf:

[global]
    bind interfaces only = yes
    interfaces = 10.10.0.1

However, service smbd restart fails with the following errors:

systemd[1]: smbd.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: smbd.service: Failed with result 'core-dump'.

/var/log/samba/log.smbd contains the following errors:

[2020/07/11 19:18:27.150483,  0] ../../source3/smbd/server.c:1775(main)
  smbd version 4.11.6-Ubuntu started.
  Copyright Andrew Tridgell and the Samba Team 1992-2019
[2020/07/11 19:18:27.154342,  0] ../../source3/lib/interface.c:669(load_interfaces)
  WARNING: no network interfaces found
[2020/07/11 19:18:27.171360,  0] ../../lib/util/become_daemon.c:135(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2020/07/11 19:18:27.173306,  0] ../../source3/smbd/server.c:1240(open_sockets_smbd)
  open_sockets_smbd: No sockets available to bind to.
[2020/07/11 19:18:27.173974,  0] ../../source3/lib/util.c:823(smb_panic_s3)
  PANIC (pid 29543): open_sockets_smbd() failed
[2020/07/11 19:18:27.174765,  0] ../../lib/util/fault.c:264(log_stack_trace)
  BACKTRACE: 9 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x34) [0x7f16d1581624]
   #1 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x1f) [0x7f16d11d148f]
   #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x33) [0x7f16d1581723]
   #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1269da) [0x7f16d13339da]
   #4 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x126d57) [0x7f16d1333d57]
   #5 /usr/lib/x86_64-linux-gnu/samba/libsmbd-shim.so.0(exit_server+0x18) [0x7f16d0de5278]
   #6 /usr/sbin/smbd(main+0x130f) [0x55854a7b52af]
   #7 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f16d086f0b3]
   #8 /usr/sbin/smbd(_start+0x2e) [0x55854a7b5d9e]
[2020/07/11 19:18:27.174831,  0] ../../source3/lib/util.c:836(smb_panic_s3)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 29543]
[2020/07/11 19:18:27.176862,  0] ../../source3/lib/util.c:843(smb_panic_s3)
  smb_panic(): action returned status 0
[2020/07/11 19:18:27.176893,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/log/samba/cores/smbd

NOTE: the ppp interface is working fine. I'm able to nc -l 10.10.0.1 1234 to bind to the ppp interface and I'm able to nc 10.10.0.1 1234 at the other end of the tunnel to send/receive data over the ppp interface.

Operating system is Ubuntu 20.04 64 bit

user582738
  • 21
  • 1
  • 2

0 Answers0