Skip to content

Conversation

@ranok
Copy link
Contributor

@ranok ranok commented Apr 17, 2025

Proposed changes

This PR adds a new Dockerfile for a container that runs Samba (and rsyslog) that shares a volume with the main opencanary container to share the /var/log/samba/audit.log. This allows for the opencanary container to alert/log on SMB accesses.

Things to note:

  • This copies the contents of data/smb into the container's share (called myshare by default) at build time
  • Samba uses the data/smb.conf as its configuration, allowing for the creation of other shares, or changing the permissions on the existing myshare
  • To run this, you need to add the samba container name into the docker compose command, e.g.: docker compose up -d samba latest
  • I also updated the comments to reflect the change from docker-compose to docker compose

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Lint and unit tests pass locally with my changes (if applicable)
  • I have run pre-commit (pre-commit in the repo)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Linked to the relevant github issue or github discussion

@ranok ranok requested a review from jayjb April 17, 2025 18:10
# - ./data/smb.conf:/etc/samba/smb.conf
# network_mode: host
# ports:
# # SMB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want 139 too?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants