Skip to content

Commit

Permalink
accept optional source address for rsync of data, fixes farsightsec#8
Browse files Browse the repository at this point in the history
- adds an optional config parameter `rsync_source`, which will set the
  bind_interface option on the ssh session used by rsync when present
  • Loading branch information
mpounsett committed May 5, 2023
1 parent ca2afc4 commit c9b7185
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ maxper="16"

channel="ch202"
interface="eth0"
# rsync_source="2001:db8::1" # optional
DNSQR_RES_ADDRS="192.0.2.1, 2001:db8::1"

syslog_priority="local5.info"
Expand Down
8 changes: 7 additions & 1 deletion packaging/general/sie-dns-sensor/usr/lib/sie/functions
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ fi

### internal settings

ssh_cmd="ssh -p %p -i $uploadkey -o UserKnownHostsFile=$knownhosts -o StrictHostKeyChecking=yes"
if [ -z "$rsync_source" ]; then
source_cmd=""
else
source_cmd="-b $rsync_source"
fi

ssh_cmd="ssh $source_cmd -p %p -i $uploadkey -o UserKnownHostsFile=$knownhosts -o StrictHostKeyChecking=yes"
rsync_args="--timeout=10 --remove-source-files"
submitservice="_rsync._tcp."

Expand Down

0 comments on commit c9b7185

Please sign in to comment.