Commit ed808ac4 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(IPS) add Add promisc mode / physical interface selection, closes...

(IPS) add Add promisc mode / physical interface selection, closes https://github.com/opnsense/core/issues/935

(cherry picked from commit 3bacc745)
(cherry picked from commit 8b4b5bbb)
parent 6f3b7af5
...@@ -13,12 +13,19 @@ ...@@ -13,12 +13,19 @@
before enabling, please disable all hardware offloading first. <br><a href="/system_advanced_network.php">in advanced network</a> before enabling, please disable all hardware offloading first. <br><a href="/system_advanced_network.php">in advanced network</a>
]]></help> ]]></help>
</field> </field>
<field>
<id>ids.general.promisc</id>
<label>promiscuous mode</label>
<type>checkbox</type>
<help><![CDATA[enable promiscuous mode, for certain setups (like IPS with vlans), this is required to actually capture data on the physical interface
]]></help>
</field>
<field> <field>
<id>ids.general.interfaces</id> <id>ids.general.interfaces</id>
<label>interfaces</label> <label>interfaces</label>
<type>select_multiple</type> <type>select_multiple</type>
<style>tokenize</style> <style>tokenize</style>
<help><![CDATA[Select interface(s) to use.]]></help> <help><![CDATA[Select interface(s) to use. When enabling IPS, only use physical interfaces here (no vlans etc).]]></help>
<hint>Type or select interface.</hint> <hint>Type or select interface.</hint>
</field> </field>
</form> </form>
...@@ -92,10 +92,15 @@ ...@@ -92,10 +92,15 @@
<default>0</default> <default>0</default>
<Required>Y</Required> <Required>Y</Required>
</ips> </ips>
<promisc type="BooleanField">
<default>0</default>
<Required>Y</Required>
</promisc>
<interfaces type="InterfaceField"> <interfaces type="InterfaceField">
<Required>Y</Required> <Required>Y</Required>
<default>wan</default> <default>wan</default>
<multiple>Y</multiple> <multiple>Y</multiple>
<AddParentDevices>Y</AddParentDevices>
<filters> <filters>
<enable>/^(?!0).*$/</enable> <enable>/^(?!0).*$/</enable>
</filters> </filters>
......
...@@ -313,7 +313,7 @@ netmap: ...@@ -313,7 +313,7 @@ netmap:
- interface: default - interface: default
threads: auto threads: auto
copy-mode: ips copy-mode: ips
disable-promisc: yes disable-promisc: {% if helpers.exists('OPNsense.IDS.general.promisc') and OPNsense.IDS.general.promisc|default('0') == '0' %}yes{% else %}no{% endif %} # promiscuous mode
checksum-checks: auto checksum-checks: auto
{% if helpers.exists('OPNsense.IDS.general.interfaces') %} {% if helpers.exists('OPNsense.IDS.general.interfaces') %}
...@@ -745,6 +745,7 @@ logging: ...@@ -745,6 +745,7 @@ logging:
pcap: pcap:
- interface: default - interface: default
promisc: {% if helpers.exists('OPNsense.IDS.general.promisc') and OPNsense.IDS.general.promisc|default('0') == '1' %}yes{% else %}no{% endif %} # promiscuous mode
pcap-file: pcap-file:
# Possible values are: # Possible values are:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment