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
    
  
  
    
  | #!/usr/bin/python3 -u | |
| """ | |
| Title : send-dst-unreach | |
| Last modified date : 14.02.2024 | |
| Author : Martin Tonusoo | |
| Description : Reads packets from Netfilter queue, sends the | |
| ICMPv6 type "Destination Unreachable" code | |
| "Source address failed ingress/egress policy" | |
| as a response to those packets and finally | 
  
    
      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
    
  
  
    
  | package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "github.com/go-ldap/ldap/v3" | |
| ) | |
| const ( | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env python | |
| """Run `snort -A console` command using a pipe. | |
| Warning! Alerts are delayed until snort's stdout buffer is flushed. | |
| """ | |
| from __future__ import print_function | |
| from subprocess import Popen, PIPE, STDOUT | |
| snort_process = Popen(['snort', '-A', 'console', '-c', 'snort.conf'], | |
| stdout=PIPE, stderr=STDOUT, bufsize=1, | 
  
    
      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
    
  
  
    
  | exit #Not that kind of script, these sections should be run manually | |
| # First get lxd working | |
| # Install lxc/lxd. On ubuntu 18.04 I'm using snap to install lxd https://docs.snapcraft.io/installing-snapd/6735 | |
| sudo apt install snapd | |
| sudo snap install lxd # https://mangolassi.it/topic/18073/installing-lxd-on-ubuntu-18-04-the-right-way | |
| # Using ZFS for container storage makes it easy to move things around | |
| sudo apt-get install zfsutils-linux |