Server nf file for rsync over port 273:Ĭert = /etc/stunnel/įire up stunnel with the stunnel command: Note these require the rsync service to be defined following the above steps. The stunnel configuration file will accept connections on 273 and connect them to port 873. The stunnel connection we will set up will be over port 273. Stunnel Server for Rsync Configure Stunnel Server for Rsync Where A.B.C.D is the server's IP address.) (Optional: may need to add this to /etc/hosts.allow but this messed things up for me: Ssyncd 273/tcp # secure rsync over stunnel Rsync is just tcp traffic, so we can define a new service and tell the system what port and protocol it uses.Īdd the following line to the server's /etc/services (match it exactly): The next thing we need to do is give the system a bit more information about the protocol we are using. Once you have set the rsync configuration file, the rsync daemon will run like any standard system service.Īlternatively, you can get an rsync docker container up and running: Docker/Rsync Adding Tcp Wrappers for Secure Rsync Protocol Run rsync stunnel container: Running Rsync Server Universal rsync stunnel configuration file: įinally, the Makefile calls the run script and passes the port number to the run script, which hooks up the necessary ports between the host and the container, mounts the necessary volumes, and sets up the docker network interface (as well as running the container in the foreground or background). The build script updates the port number in both the Dockerfile and in the rsync stunnel configuration file using sed, then bakes these files into the final container image using docker build. The build docker container script actually uses the Dockerfile, which assembles the various files that are needed to run both stunnel and rsync. Makefile that calls build and run scripts: īuild rsync stunnel docker container script: The build script will use sed to find/replace the token PORT with the numerical port. The Makefile will ultimately set the port number, and pass that into the build script.Everywhere you need to specify the numerical port, use the token PORT.First, define a universal rsync stunnel configuration file.Setting up rsync server config (which dir to rsync to).Better organization of stunnel - since each service requires different configurations and ports should be easy to switch in and out. This enabled flexibility in port number, and enabled switching from 273 to 443 more easily.Build script, run script, open firewall script.The Makefile would set the port, and feed that as an argument to each script.Makefile was entry point: make rsync or make ssh.Reorganized all of the files in the repository so that each service had its own configuration and build sequence.3.3 Forever Loop: Listening for Client Changes.3.2.1 Configuring Stunnel Client for Rsync.3.1.3 Adding Tcp Wrappers for Secure Rsync Protocol.2.2.1 Configure Stunnel Server for Rsync.2.1.3 Adding Tcp Wrappers for Secure Rsync Protocol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |