-
Notifications
You must be signed in to change notification settings - Fork 45
Feed sync #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
syspect-sec
wants to merge
111
commits into
greenbone:main
Choose a base branch
from
syspect-sec:feed-sync
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feed sync #456
Changes from 107 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
7ec84df
Create gvm-feed-sync-docs
syspect-tech a03f3a0
Delete gvm-feed-sync-docs
syspect-tech 4448f26
Create greenbone-feed-sync-docs.md
syspect-tech b112f6d
Update greenbone-feed-sync-docs.md
syspect-tech 46d936a
Update greenbone-feed-sync-docs.md
syspect-tech 9936598
Update greenbone-feed-sync-docs.md
syspect-tech a03379f
created feed-sync docs
syspect-tech 693ad85
feed-sync changes
syspect-tech 0688cc2
Removed the file and refernces to web interface documentation to keep…
syspect-tech 9da852a
just temporarily stashing changes on hold
syspect-tech 894013f
complete first-draft of Greenbone community feed sync documentation
syspect-sec 9bfbac8
Added some changes to the Troubleshooting a connection section
syspect-sec 0a5976c
Added warning label to all notices about Docker containers feed sync
syspect-sec bb7343a
Fix: Fix compose command for downloading gvmd data manually
bjoernricks 9a29da6
Bump the python-packages group with 3 updates
dependabot[bot] 2ff3c96
Bump idna from 3.6 to 3.7
dependabot[bot] 598ae51
Add: openvas logs
nichtsfrei 217ffdc
Add: openvasd Remove: notus
nichtsfrei 881f3a4
Doc: remove notus-scanner and explain openvasd installation
nichtsfrei fbd9986
Update changelog.md
bjoernricks e0b4711
Fix: can not open or create log file
nichtsfrei ef15a28
OpenVasd Build Documation
Toys0125 046bcae
Bump the python-packages group with 2 updates
dependabot[bot] cd4ff0a
Change: Update docs for replacing notus-scanner with openvasd
bjoernricks de40eee
Add: openvasd container description
nichtsfrei 86f60e0
Add: service description for openvasd
nichtsfrei a5432d6
Add: description of openvasd and it's goals
nichtsfrei 844bee7
Add: openvasd configuration
nichtsfrei 56f7bb3
Add: libcurl dependency to openvas-scanner
nichtsfrei 77aafe5
Add: remove cargo from Debian and Centos
nichtsfrei 21d6ee9
Add: scnnaerctl to openvasd, respect $INSTALL_DIR
nichtsfrei b4041ad
Stop and start openvasd via sytemctl too
bjoernricks 646fb16
Fix: source-build: adds ospd-openvasd systemd dependency to openvasd.
nichtsfrei 6cc0bc9
Fix captions for code block
bjoernricks 7debfad
Bump the python-packages group with 3 updates
dependabot[bot] a9738ae
Update workflows.md
Nicolaj-H 23327f7
Bump the python-packages group with 3 updates
dependabot[bot] 46e3164
Small change to configuring gsad.service for remote access
syspect-sec a2b589d
Bump the python-packages group with 2 updates
dependabot[bot] f6aa8b0
Create gvm-feed-sync-docs
syspect-tech c9c382c
Delete gvm-feed-sync-docs
syspect-tech cfaa584
Create greenbone-feed-sync-docs.md
syspect-tech 950d860
Update greenbone-feed-sync-docs.md
syspect-tech 3f210d0
Update greenbone-feed-sync-docs.md
syspect-tech 8e03c40
Update greenbone-feed-sync-docs.md
syspect-tech 6baca0d
---
dependabot[bot] 529a765
---
dependabot[bot] f7de60c
corrected the path for moving the openvasd build
syspect-sec a21dc39
Adjusted changelog.md
syspect-sec 53e4449
Bump the python-packages group with 4 updates
dependabot[bot] e6d89ed
Fix: Typo in environment variable
n-thumann b5f3223
Fix: Typo in comment
n-thumann b7f10b7
Bump the python-packages group with 6 updates
dependabot[bot] 2e6a1af
Bump the python-packages group with 3 updates
dependabot[bot] 4a4c831
Bump urllib3 from 2.2.1 to 2.2.2
dependabot[bot] 9c5f0a8
Bump the python-packages group across 1 directory with 2 updates
dependabot[bot] f948785
Bump exceptiongroup from 1.2.1 to 1.2.2 in the python-packages group
dependabot[bot] 9d92ac4
Fix color of "view this page" icon in dark mode (#489)
k-schlosser 97071b1
Change color of visited links
k-schlosser f3cbf90
Remove MQTT broker from architecture image
k-schlosser d3b38d8
Update version of ospd-openvas (#494)
k-schlosser 11cf575
Remove arrow between Notus scanner and target systems in architecture…
k-schlosser d10212d
Bump the python-packages group across 1 directory with 10 updates
dependabot[bot] 80f745f
Update versions of source-build components
k-schlosser 4f96cd7
Updated line 62 and 202 with ne registry
gabrielschowe eaa415e
Bump uvicorn from 0.30.3 to 0.30.5 in the python-packages group
dependabot[bot] 35b5954
Revert "Updated line 62 and 202 with ne registry"
y0urself 4e757fc
Bump the python-packages group with 5 updates
dependabot[bot] 2397d87
Update src/feed-sync.md
syspect-sec aec90f7
Update src/feed-sync.md
syspect-sec c25d8d4
Update src/feed-sync.md
syspect-sec ef915da
Update src/feed-sync.md
syspect-sec 55347bc
Update src/feed-sync.md
syspect-sec 558ffc4
Update src/feed-sync.md
syspect-sec 14e15a2
Update src/feed-sync.md
syspect-sec e0f351c
Update src/feed-sync.md
syspect-sec aac3c42
Update src/feed-sync.md
syspect-sec fea2ceb
Update src/feed-sync.md
syspect-sec 8670810
Update src/feed-sync.md
syspect-sec 4cddf2f
Update src/feed-sync.md
syspect-sec 59cd4cb
Update src/feed-sync.md
syspect-sec c8b1bb4
Update src/feed-sync.md
syspect-sec 8844977
Update src/feed-sync.md
syspect-sec c4e12a1
Update src/feed-sync.md
syspect-sec 8aa92ae
Update src/feed-sync.md
syspect-sec deb3378
Update src/feed-sync.md
syspect-sec f5216d8
Apply suggestions from code review
syspect-sec 654e742
Create gvm-feed-sync-docs
syspect-tech 0cc42ab
Delete gvm-feed-sync-docs
syspect-tech e1399ff
Create greenbone-feed-sync-docs.md
syspect-tech 9449622
Update greenbone-feed-sync-docs.md
syspect-tech 2bdd6bb
Update greenbone-feed-sync-docs.md
syspect-tech 973d54d
Update greenbone-feed-sync-docs.md
syspect-tech e3b422b
created feed-sync docs
syspect-tech f888b01
feed-sync changes
syspect-tech 87138bd
Removed the file and refernces to web interface documentation to keep…
syspect-tech 0f4122a
just temporarily stashing changes on hold
syspect-tech a62b20a
complete first-draft of Greenbone community feed sync documentation
syspect-sec 526a072
Added some changes to the Troubleshooting a connection section
syspect-sec b6fdd97
Added warning label to all notices about Docker containers feed sync
syspect-sec e993ec2
Merge branch 'main' of https://github.com/greenbone/docs
syspect-sec a0fd77a
Merge branch 'main' into feed-sync
syspect-sec 9f8335d
Fixed introduction paragraph for clarify and malformed tags for a not…
syspect-sec 7144b1e
changelog merge conflict fixed
syspect-sec 238b055
commit conflics before merge with upstream main changes
syspect-sec f5238c2
fixed problems with the src/feed-sync.md file. Some fragments of the…
syspect-sec c55e4a4
Changed the context of the introduction paragraph to refer to a singl…
syspect-sec c6ea3b7
Update greenbone-feed-sync-docs.md
k-schlosser 849c680
Update greenbone-feed-sync-docs.md
k-schlosser 53fcdf8
Update greenbone-feed-sync-docs.md
k-schlosser 04e1309
Update greenbone-feed-sync-docs.md
k-schlosser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
|
|
||
| # Greenbone Feed Sync Update Guide | ||
|
|
||
| This documentation provides instructions on updating the feed sync for your specific Greenbone version and installation method. Please note that there is currently a migration from the `/usr/local/sbin/greenbone-feed-sync` bash script to a new Python-based script with the same name: `greenbone-feed-sync`. Also, please note that Kali Linux distribution comes with its own additional bash command script `gvm-feed-update`, yet we do recommend using the native Greenbone feed-sync commands. | ||
|
|
||
| If you are unable to achieve feed syncronization after reading this guide, or require further assistance with the feed sync update process, please consult the [Greenbone community forums](https://forum.greenbone.net/) or contact our support team for guidance. | ||
|
|
||
| ## A Note About Deprecated Sync Scripts | ||
| The following sync scripts listed below are deprecated and no longer installed by default since gvmd 22.5.0. If you want to check if you have these scripts installed you can try the following command: | ||
| ``` | ||
| $ which <feed-command> | ||
| ``` | ||
| - `greenbone-certdata-sync`: This script is equivalent to greenbone-feed-sync --type CERT, and it was primarily provided for backwards compatibility. | ||
| - `greenbone-scapdata-sync`: This script is equivalent to greenbone-feed-sync --type SCAP 1, and it was primarily provided for backwards compatibility. | ||
k-schlosser marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - `greenbone-nvt-sync`: This script, written in bash, was used to download vulnerability tests data (nasl and notus files). It is deprecated since openvas-scanner 22.6.0. | ||
| - `/usr/local/sbin/greenbone-feed-sync` or `/usr/sbin/greenbone-feed-sync`: This is the old sync script written in bash to download CERT, SCAP, and GVMD_DATA. It is no longer installed by default since gvmd 22.5.0. | ||
k-schlosser marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Deprecated Sync Scripts Removal | ||
| **[???]Should I include this** If you have any of the deprecated sync scripts (`greenbone-certdata-sync`, `greenbone-scapdata-sync`, `greenbone-nvt-sync`, `/usr/local/sbin/greenbone-feed-sync` or `/usr/sbin/greenbone-feed-sync`) installed, it is recommended to remove them. This step ensures a clean transition to the new sync script. | ||
|
|
||
| ## Introduction Of The New Python Feed Sync Script | ||
| A new Python-based `greenbone-feed-sync` command now replaces the deprecated feed sync scripts mentioned above. This new script can be run with can be run with **Greenbone version 22.4 and later**, however, older versions are not supported. This new feed sync method will now be installed by default as of **Greenbone Community Edition version 22.5.0**. | ||
k-schlosser marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The new script can handle various use cases, including the functionality provided by the `gvm-feed-update` which is provided by the Kali/Debian packagers. Full documentation for the new Python-based feed update script can be found [here](https://github.com/greenbone/greenbone-feed-sync/). | ||
|
|
||
| ### Installation | ||
| Python 3.9 and later is supported. Also note that sycing feeds requires the `rsync` tool being installed and available within the PATH, which is normally installed as part of Greenbone Community Edition's source code and docker container installation methods. | ||
|
|
||
| #### Install using pipx | ||
| You can install the latest stable release of pontos from the Python Package Index (pypi) using [pipx](https://pypa.github.io/pipx/) | ||
| ``` | ||
| $ python3 -m pipx install greenbone-feed-sync | ||
| ``` | ||
|
|
||
| #### Install using pip | ||
| NOTE: The pip install command does no longer work out-of-the-box in newer distributions like Ubuntu 23.04 because of [PEP 668](https://peps.python.org/pep-0668). Please use the [installation via pipx](https://github.com/greenbone/greenbone-feed-sync/tree/main#install-using-pipx) instead. | ||
|
|
||
| You can install the latest stable release of greenbone-feed-sync from the Python Package Index (pypi) using [pip](https://pip.pypa.io/) | ||
| ``` | ||
| $ python3 -m pip install greenbone-feed-sync | ||
| ``` | ||
|
|
||
| ## Instructions For Updating the Greenbone Feeds | ||
|
|
||
| ### Determine Which Command Is In Use | ||
| Before you can udpate the Greenbone feed sync, you should check which version of the commands are active when you execute the `greenbone-feed-sync` command. To do that, use the `which` command to determine the path of the command that is executed. | ||
|
|
||
| For example: | ||
| ``` | ||
| $ which greenbone-feed-sync | ||
| /usr/local/bin/greenbone-feed-sync | ||
| ``` | ||
| Once you determine the path of the executed command you can identify whether it is the new Python-based feed sync command or the legacy bash version. To do that, use the `head` command to print the first line of the script. This will indicate the interpreter used at execution run-time. | ||
|
|
||
| For example: | ||
| ``` | ||
| # If the new Python-based feed update script is active you will see | ||
| $ head -1 /usr/local/bin/greenbone-feed-sync | ||
| #!/usr/bin/python3 | ||
| ``` | ||
| ``` | ||
| # If the legacy bash feed update script is active you will see | ||
| $ head -1 /usr/local/bin/greenbone-feed-sync | ||
| #!/bin/sh | ||
| ``` | ||
|
|
||
| ### Updating Feeds With New Python Script | ||
| By default, when no arguments are passed, it runs the sync operation for all types of feed data. To ensure proper execution and permissions, the new Python script must be run with root/sudo permissions, as it will need to change its execution context to the `gvm` or `_gvm` user. | ||
| ``` | ||
| # Update all feeds with single command | ||
| $ sudo greenbone-feed-sync | ||
| ``` | ||
| To update only one feed at a time, the new Python-based command can be used similar to the previous `/usr/sbin/greenbone-feed-sync` bash script command by specifying a feed type, however, note that the new feed types use lowercase and more options are available. | ||
| ``` | ||
| # Include the feed type as an argument to update only a specific feed type | ||
| $ greenbone-feed-sync --type <feed-type> | ||
| ``` | ||
| The available feed types are: | ||
|
|
||
| * `all`: same as using the command without specifying a type | ||
| * `nvt`: Fetches any newly available vulnerability tests | ||
| * `gvmd-data`: Synchronizes GVM data feed which includes [???] | ||
| * `scap`: Synchronizes SCAP data feed | ||
| * `cert`: Synchronizes CERT data feed | ||
| * `notus`: Fetch any newly available NOTUS vulnerability tests | ||
| * `nasl`: Fetch any newly available NASL vulnerability tests | ||
| * `report-format` or `report-formats`: Fetches any newly available scan report formats | ||
| * `scan-config` or `scan-configs`: Fetches any newly available scan configurations | ||
| * `port-list` or `port-lists`: Fetches any newly available port lists | ||
|
|
||
| For other options, see the [full documentation here](https://github.com/greenbone/greenbone-feed-sync/). | ||
|
|
||
| ### Updating Feeds With Legacy Bash Script | ||
|
|
||
| To update the feed sync using the legacy `greenbone-feed-sync` command, the `--type` parameter is **required**. | ||
| ``` | ||
| # Update feeds with legacy bash script | ||
| $ sudo -u gvm greenbone-feed-sync --type <feed-type> | ||
| ``` | ||
| Using one of the following values to replace **\<feed-type>**: | ||
|
|
||
| * `CERT`: Synchronizes CERT data feed | ||
| * `SCAP`: Synchronizes SCAP data feed | ||
| * `GVMD_DATA`: Synchronizes gvmd data feed | ||
|
|
||
| Other arguments that can be passed to the legacy command include: | ||
|
|
||
| * `--version`: Displays the version of the script | ||
| * `--identify`: Displays information about the script, including script ID, name, version, feed name, whether it is restricted or not | ||
| * `--describe`: Displays a description of the script and the feed it synchronizes | ||
| * `--feedversion`: Displays the version of the feed | ||
| * `--selftest`: Performs a self-test to check if all required utilities are available | ||
| * `--feedcurrent`: Checks if the feed is already up to date | ||
|
|
||
| ### Updating Feeds For Kali Linux Native Installation | ||
| Kali Linux includes its own command for feed syncronization. To update all feeds issue the command as follows | ||
| ``` | ||
| ┌──(dev㉿kali)-[~] | ||
| └─$ sudo gvm-feed-update | ||
| ``` | ||
| Please note that the `gvm-feed-update` command mentioned above is not maintained by Greenbone. It is maintained by the Kali/Debian package managers. Under the hood, the `gvm-feed-update` is a bash script that essentially executes the standard `greenbone-feed-sync --type <feed-type>` scripts provided by Greenbone. We recommend avoiding the use of `gvm-feed-update` for your feed sync operations. | ||
|
|
||
| ### Verifying Successfull Feed Sync Update | ||
| After the sync operation completes, you can verify the successful update of the feed data. To confirm the updated feed status visit the `/feedstatus` page which can be found under the **Administration** item in the top menu bar of Greenbone's web-interface. If a feed has successfully updated you will see **Current** beside the particular feed. | ||
|
|
||
| ## Automating Feed Sync Updates | ||
| The Greenbone feeds are not automatically synced in the case of a Greenbone Community source code installation, for the Greenbone Community Docker containers, or the Greenbone native Kali Linux installation. The sugested method for automating the Greenbone feed sync is to create a crontab file to schedule the schedule the appropriate commands. | ||
|
|
||
| If using the new Python-based command, the crontab should be run under the root user context, however, if using the legacy feed sync bash script, the crontab should be created specifcally for the `gvm` or `_gvm` user. | ||
|
|
||
| 1. [MORE] | ||
|
|
||
| 2. Determine whether your installation uses the `gvm` or `_gvm` user. The Kali linux installation is typically the only installation type that uses `_gvm`. Therefore, you should expect to see either of these output: | ||
| ``` | ||
| ┌──(dev㉿kali)-[~] | ||
| └─$ awk -F: '{ print $1}' /etc/passwd | grep gvm | ||
| _gvm | ||
| ``` | ||
| ``` | ||
| $ awk -F: '{ print $1}' /etc/passwd | grep gvm | ||
| gvm | ||
| ``` | ||
|
|
||
| ## Troubleshooting A Connection To The Greenbone Feeds | ||
| To trouble shoot a connection to the Greenbone feeds, you can issue the following command from a terminal. | ||
| ``` | ||
| $ rsync rsync://feed.community.greenbone.net/community | ||
| ``` | ||
| You should see output such as the following: | ||
| ``` | ||
| Greenbone community feed server - http://feed.community.greenbone.net/ | ||
| This service is hosted by Greenbone Networks - http://www.greenbone.net/ | ||
|
|
||
| All transactions are logged. | ||
|
|
||
| If you have any questions, please use the Greenbone community portal. | ||
| See https://community.greenbone.net for details. | ||
|
|
||
| By using this service you agree to our terms and conditions. | ||
|
|
||
| Only one sync per time, otherwise the source ip will be temporarily blocked. | ||
|
|
||
| data-objects Greenbone community data objects, see https://community.greenbone.net/ | ||
| nvt-feed Greenbone community NVT feed, see https://community.greenbone.net/ | ||
| scap-data Greenbone community SCAP data feed, see https://community.greenbone.net/ | ||
| cert-data Greenbone community CERT data feed, see https://community.greenbone.net/ | ||
| community-legacy Greenbone community legacy feed, see https://community.greenbone.net/ | ||
| community Greenbone community feed, see https://community.greenbone.net/ | ||
| ``` | ||
| If you are unable to connect to the Greenbone feeds using the `rsync` command, we suggest you troubleshoot your network connection to identify any potential firewalls, content proxies, or network configurations. To do this you can try some of the following methods: | ||
|
|
||
| ### Use nping | ||
|
|
||
| The `nping` command is part of the `nmap` tool. It can be used to directly traceroute a TCP connection to a specific port while `traceroute` and `tcptraceroute` cannot be configured to test a specific port. This will help identify port-based firewall rules as well as host/IP-based firewall rules. Note: `nping --tcp` command requires `sudo` or root permissions. | ||
| ``` | ||
| $ sudo nping --tcp --traceroute -c 13 -p 873 feed.community.greenbone.net | ||
| ``` | ||
| ### Use traceroute/tracert | ||
| If you cannot install `nmap` on your host, you can try `traceroute` on Linux/Unix based systems or `tracert` for Windows which are both typically installed by default. | ||
| ``` | ||
| # For Linux/Unix systems | ||
| $ traceroute feed.community.greenbone.net | ||
| ``` | ||
| ``` | ||
| # For Windows systems | ||
| $ tracert feed.community.greenbone.net | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.