# Extending OpenVAS Scans to Multiple Subnets Using SSH Layer 2 VPN

**URL:** <https://forum.greenbone.net/t/extending-openvas-scans-to-multiple-subnets-using-ssh-layer-2-vpn/18642>\
**Category:** How To\
**Created:** [July 8, 2024, 10:42am UTC](https://forum.greenbone.net/t/extending-openvas-scans-to-multiple-subnets-using-ssh-layer-2-vpn/18642 "2024-07-08T10:42:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m4lf0](https://forum.greenbone.net/letter_avatar/m4lf0/32/6_449c533f586939b6e5f246632a46421f.png) [@m4lf0](https://forum.greenbone.net/u/m4lf0)\
**Post date:** [July 8, 2024, 10:42am UTC](https://forum.greenbone.net/t/extending-openvas-scans-to-multiple-subnets-using-ssh-layer-2-vpn/18642/1 "2024-07-08T10:42:29Z")

</div>

Hi everyone,

I’m looking to solve a problem and would appreciate your help.

I have installed OpenVAS on a server, which is a virtual machine. On the target network, I have also installed a virtual machine (a sort of virtual appliance) that I connect to via an SSH Layer 2 VPN, using TAP interfaces. Scanning from my server (let’s call it network A) to the target network (let’s call it network B) works correctly.

```auto
OpenVAS ----> VPN Layer 2 SSH ----> Target Network
 Network A Network B

```

My goal now is to extend the scans to all subnets within network B. What I tried to do is add a new ENS interface within network B, assign it a free IP address, configure NAT, and set up the firewall to allow access to all TCP/UDP rules, etc.

```auto
OpenVAS ----> VPN Layer 2 SSH ----> Target Network
 Network A Network B
                                     |
                                     ----> Subnet B.1

```

The ping from network A to subnet B.1 works; I can see the traffic correctly using TCPdump and traceroute. However, the issue is that the scans are “falsified.”

I tested by directly placing my VM inside the subnet and performing a scan (where the results show multiple high vulnerabilities). Then, I tried passing through the “management network” applying my idea, and the scans are completely different! I don’t see any vulnerabilities as if the traffic is not reaching the targets (even though ping and traceroute work).

So:

```
If I install a VM for each subnet, it works.
If I install a single VM for the management network and redirect traffic to the subnets, it doesn't work.

```

Why do you think this happens?  
Am I missing something in the firewall configuration?  
Is there a better way to achieve what I have in mind, i.e., scanning the subnets by installing a single virtual machine that acts as a gateway?

I look forward to your suggestions and thank you in advance!

---

<div class="post-metadata">

**Author:** ![Lukas](https://forum.greenbone.net/user_avatar/forum.greenbone.net/lukas/32/17_2.png) [@Lukas](https://forum.greenbone.net/u/Lukas)\
**Post date:** [July 8, 2024, 11:55am UTC](https://forum.greenbone.net/t/extending-openvas-scans-to-multiple-subnets-using-ssh-layer-2-vpn/18642/2 "2024-07-08T11:55:30Z")

</div>

That is not a supported setup, and without looking at a TCP-Dump i can´t tell you. It might me a MTU related issue, esp. if ICMP works but not TCP. In General scanning trough a firewall or via VPN is not recommended at all. It is always better just speak the Management Protocol via the VPN and deploy local scanner into each sub-network.

I know that some GVM installations use OpenVPN successfully as Layer-2 VPN to scan trough …

---

<div class="post-metadata">

**Author:** ![system](https://forum.greenbone.net/uploads/default/original/2X/4/4660e797edfaea797a8c9965246072ea26732804.png) [@system](https://forum.greenbone.net/u/system)\
**Post date:** [April 7, 2025, 10:22am UTC](https://forum.greenbone.net/t/extending-openvas-scans-to-multiple-subnets-using-ssh-layer-2-vpn/18642/3 "2025-04-07T10:22:58Z")

</div>

Closed on April 7, 2025, 10:22am UTC


