diff --git a/Computer-Networks/CN_R1/installation.sh b/Computer-Networks/CN_R1/installation.sh new file mode 100644 index 0000000..817f588 --- /dev/null +++ b/Computer-Networks/CN_R1/installation.sh @@ -0,0 +1,6 @@ +#!/usr/bin/sh +############## quagga installation ############### +cd /usr/share/doc/quagga/examples +sudo chmod * 640 +sudo rename 's/\.conf.sample$/\.conf/' *.conf.sample +sudo cp * /etc/quagga diff --git a/Computer-Networks/CN_R1/playbook.yml b/Computer-Networks/CN_R1/playbook.yml index aaf2f47..85e51d0 100644 --- a/Computer-Networks/CN_R1/playbook.yml +++ b/Computer-Networks/CN_R1/playbook.yml @@ -1,7 +1,7 @@ --- -- hosts: Computer-Networks +- hosts: Computer-Networks become: yes - tasks: + tasks: - name: Install Software for Computer Networks Lab apt: pkg: "{{ item }}" @@ -22,17 +22,18 @@ - echoping - tftp - telnet - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree + - snmp + - psad + - quagga-doc - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: @@ -45,5 +46,19 @@ src: ~/ansible/ComputerNetworks/CN_R1/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Copy installation script + copy: + src: ~/ansible/ComputerNetworks/CN_R1/installation.sh + dest: /tmp/ + + - name: Run the Installation script + shell: sh /tmp/installation.sh + + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl enable lightdm.service + + - name: Disable dhcpd + shell: systemctl disable isc-dhcp-server diff --git a/Computer-Networks/CN_R2/installation.sh b/Computer-Networks/CN_R2/installation.sh new file mode 100644 index 0000000..9442b77 --- /dev/null +++ b/Computer-Networks/CN_R2/installation.sh @@ -0,0 +1,48 @@ +#!/usr/bin/sh +############### snort installation ################# + +sudo apt install -y gcc g++ flex bison libpcap-dev libpcre3-dev autoconf libtool libdumbnet-dev zlib1g-dev pkg-config libssl-dev libpcre3-dev fwsnort +autoreconf -f -i +cd /home/student/ +sudo wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz +sudo wget https://www.snort.org/downloads/snort/snort-2.9.9.0.tar.gz +tar -xvzf daq-2.0.6.tar.gz +tar -xvzf snort-2.9.9.0.tar.gz + +cd /home/student/snort_src/daq-2.0.6 +./configure && make && sudo make install +cd /home/student/snort_src/snort-2.9.9.0 +./configure && make && sudo make install + +sudo ldconfig + +sudo mkdir /etc/snort +sudo mkdir /etc/snort/preproc_rules +sudo mkdir /var/log/snort +sudo mkdir /usr/local/lib/snort_dynamicrules +sudo touch /etc/snort/rules/white_list.rules +sudo touch /etc/snort/rules/black_list.rules +sudo touch /etc/snort/rules/local.rules +sudo chmod -R 5775 /etc/snort/ +sudo chmod -R 5775 /var/log/snort/ +sudo chmod -R 5775 /usr/local/lib/snort +sudo chmod -R 5775 /usr/local/lib/snort_dynamicrules/ +cd /home/student/snort_src/snort-2.9.9.0/etc +sudo cp -avr *.conf *.map *.dtd /etc/snort/ +sudo cp -avr src/dynamic-preprocessors/build/usr/local/lib/snort_dynamicpreprocessor/* /usr/local/lib/snort_dynamicpreprocessor/ + +mv /home/student/snortrules-snapshot-2990.tar.gz /etc/snort +cd /etc/snort +tar xvfz snortrules-snapshot-2990.tar.gz + +mkdir /home/student/InfectedPcaps +cp /home/student/infected.pcap /home/student/InfectedPcaps + + +############## quagga installation ############### + +cd /usr/share/doc/quagga/examples +sudo chmod * 640 +sudo rename 's/\.conf.sample$/\.conf/' *.conf.sample +sudo cp * /etc/quagga + diff --git a/Computer-Networks/CN_R2/playbook.yml b/Computer-Networks/CN_R2/playbook.yml index e4bcc5a..9eda6fd 100644 --- a/Computer-Networks/CN_R2/playbook.yml +++ b/Computer-Networks/CN_R2/playbook.yml @@ -1,7 +1,7 @@ --- -- hosts: Computer-Networks +- hosts: Computer-Networks become: yes - tasks: + tasks: - name: Install Software for Computer Networks Lab apt: pkg: "{{ item }}" @@ -22,28 +22,41 @@ - echoping - tftp - telnet - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager - - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort + - traceroute + - tree + - snmp + - psad + - quagga-doc - name: Copy Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R2/configuration-files/ dest: /etc/ - - name: Copy Lightdm Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R2/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Copy installation script + copy: + src: ~/ansible/ComputerNetworks/CN_R2/installation.sh + dest: /tmp/ + + - name: Run the script + shell: sh /tmp/installation.sh + + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl disable lightdm.service + + - name: Disable dhcpd + shell: systemctl disable isc-dhcp-server diff --git a/Computer-Networks/CN_R3/installation.sh b/Computer-Networks/CN_R3/installation.sh new file mode 100644 index 0000000..9442b77 --- /dev/null +++ b/Computer-Networks/CN_R3/installation.sh @@ -0,0 +1,48 @@ +#!/usr/bin/sh +############### snort installation ################# + +sudo apt install -y gcc g++ flex bison libpcap-dev libpcre3-dev autoconf libtool libdumbnet-dev zlib1g-dev pkg-config libssl-dev libpcre3-dev fwsnort +autoreconf -f -i +cd /home/student/ +sudo wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz +sudo wget https://www.snort.org/downloads/snort/snort-2.9.9.0.tar.gz +tar -xvzf daq-2.0.6.tar.gz +tar -xvzf snort-2.9.9.0.tar.gz + +cd /home/student/snort_src/daq-2.0.6 +./configure && make && sudo make install +cd /home/student/snort_src/snort-2.9.9.0 +./configure && make && sudo make install + +sudo ldconfig + +sudo mkdir /etc/snort +sudo mkdir /etc/snort/preproc_rules +sudo mkdir /var/log/snort +sudo mkdir /usr/local/lib/snort_dynamicrules +sudo touch /etc/snort/rules/white_list.rules +sudo touch /etc/snort/rules/black_list.rules +sudo touch /etc/snort/rules/local.rules +sudo chmod -R 5775 /etc/snort/ +sudo chmod -R 5775 /var/log/snort/ +sudo chmod -R 5775 /usr/local/lib/snort +sudo chmod -R 5775 /usr/local/lib/snort_dynamicrules/ +cd /home/student/snort_src/snort-2.9.9.0/etc +sudo cp -avr *.conf *.map *.dtd /etc/snort/ +sudo cp -avr src/dynamic-preprocessors/build/usr/local/lib/snort_dynamicpreprocessor/* /usr/local/lib/snort_dynamicpreprocessor/ + +mv /home/student/snortrules-snapshot-2990.tar.gz /etc/snort +cd /etc/snort +tar xvfz snortrules-snapshot-2990.tar.gz + +mkdir /home/student/InfectedPcaps +cp /home/student/infected.pcap /home/student/InfectedPcaps + + +############## quagga installation ############### + +cd /usr/share/doc/quagga/examples +sudo chmod * 640 +sudo rename 's/\.conf.sample$/\.conf/' *.conf.sample +sudo cp * /etc/quagga + diff --git a/Computer-Networks/CN_R3/playbook.yml b/Computer-Networks/CN_R3/playbook.yml index c702836..89da31e 100644 --- a/Computer-Networks/CN_R3/playbook.yml +++ b/Computer-Networks/CN_R3/playbook.yml @@ -1,7 +1,7 @@ --- -- hosts: Computer-Networks +- hosts: Computer-Networks become: yes - tasks: + tasks: - name: Install Software for Computer Networks Lab apt: pkg: "{{ item }}" @@ -22,28 +22,42 @@ - echoping - tftp - telnet - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree + - snmp + - psad + - quagga-doc - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R3/configuration-files/ dest: /etc/ + - name: Copy installation script + copy: + src: ~/ansible/ComputerNetworks/CN_R3/installation.sh + dest: /tmp/ + + - name: Run the script + shell: sh /tmp/installation.sh - name: Copy Lightdm Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R1/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl disable lightdm.service + + - name: Disable dhcpd + shell: systemctl disable isc-dhcp-server diff --git a/Computer-Networks/CN_R4/installation.sh b/Computer-Networks/CN_R4/installation.sh new file mode 100644 index 0000000..9442b77 --- /dev/null +++ b/Computer-Networks/CN_R4/installation.sh @@ -0,0 +1,48 @@ +#!/usr/bin/sh +############### snort installation ################# + +sudo apt install -y gcc g++ flex bison libpcap-dev libpcre3-dev autoconf libtool libdumbnet-dev zlib1g-dev pkg-config libssl-dev libpcre3-dev fwsnort +autoreconf -f -i +cd /home/student/ +sudo wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz +sudo wget https://www.snort.org/downloads/snort/snort-2.9.9.0.tar.gz +tar -xvzf daq-2.0.6.tar.gz +tar -xvzf snort-2.9.9.0.tar.gz + +cd /home/student/snort_src/daq-2.0.6 +./configure && make && sudo make install +cd /home/student/snort_src/snort-2.9.9.0 +./configure && make && sudo make install + +sudo ldconfig + +sudo mkdir /etc/snort +sudo mkdir /etc/snort/preproc_rules +sudo mkdir /var/log/snort +sudo mkdir /usr/local/lib/snort_dynamicrules +sudo touch /etc/snort/rules/white_list.rules +sudo touch /etc/snort/rules/black_list.rules +sudo touch /etc/snort/rules/local.rules +sudo chmod -R 5775 /etc/snort/ +sudo chmod -R 5775 /var/log/snort/ +sudo chmod -R 5775 /usr/local/lib/snort +sudo chmod -R 5775 /usr/local/lib/snort_dynamicrules/ +cd /home/student/snort_src/snort-2.9.9.0/etc +sudo cp -avr *.conf *.map *.dtd /etc/snort/ +sudo cp -avr src/dynamic-preprocessors/build/usr/local/lib/snort_dynamicpreprocessor/* /usr/local/lib/snort_dynamicpreprocessor/ + +mv /home/student/snortrules-snapshot-2990.tar.gz /etc/snort +cd /etc/snort +tar xvfz snortrules-snapshot-2990.tar.gz + +mkdir /home/student/InfectedPcaps +cp /home/student/infected.pcap /home/student/InfectedPcaps + + +############## quagga installation ############### + +cd /usr/share/doc/quagga/examples +sudo chmod * 640 +sudo rename 's/\.conf.sample$/\.conf/' *.conf.sample +sudo cp * /etc/quagga + diff --git a/Computer-Networks/CN_R4/playbook.yml b/Computer-Networks/CN_R4/playbook.yml index cf54bc4..0b71346 100644 --- a/Computer-Networks/CN_R4/playbook.yml +++ b/Computer-Networks/CN_R4/playbook.yml @@ -1,7 +1,7 @@ --- -- hosts: Computer-Networks +- hosts: Computer-Networks become: yes - tasks: + tasks: - name: Install Software for Computer Networks Lab apt: pkg: "{{ item }}" @@ -22,28 +22,42 @@ - echoping - tftp - telnet - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree + - snmp + - psad + - quagga-doc - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R4/configuration-files/ dest: /etc/ + - name: Copy installation script + copy: + src: ~/ansible/ComputerNetworks/CN_R4/installation.sh + dest: /tmp/ + + - name: Run the script + shell: sh /tmp/installation.sh - name: Copy Lightdm Configuration files copy: src: ~/ansible/ComputerNetworks/CN_R4/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl disable lightdm.service + + - name: Disable dhcpd + shell: systemctl disable isc-dhcp-server diff --git a/Computer-Networks/CN_Ubuntu/installation.sh b/Computer-Networks/CN_Ubuntu/installation.sh new file mode 100644 index 0000000..9442b77 --- /dev/null +++ b/Computer-Networks/CN_Ubuntu/installation.sh @@ -0,0 +1,48 @@ +#!/usr/bin/sh +############### snort installation ################# + +sudo apt install -y gcc g++ flex bison libpcap-dev libpcre3-dev autoconf libtool libdumbnet-dev zlib1g-dev pkg-config libssl-dev libpcre3-dev fwsnort +autoreconf -f -i +cd /home/student/ +sudo wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz +sudo wget https://www.snort.org/downloads/snort/snort-2.9.9.0.tar.gz +tar -xvzf daq-2.0.6.tar.gz +tar -xvzf snort-2.9.9.0.tar.gz + +cd /home/student/snort_src/daq-2.0.6 +./configure && make && sudo make install +cd /home/student/snort_src/snort-2.9.9.0 +./configure && make && sudo make install + +sudo ldconfig + +sudo mkdir /etc/snort +sudo mkdir /etc/snort/preproc_rules +sudo mkdir /var/log/snort +sudo mkdir /usr/local/lib/snort_dynamicrules +sudo touch /etc/snort/rules/white_list.rules +sudo touch /etc/snort/rules/black_list.rules +sudo touch /etc/snort/rules/local.rules +sudo chmod -R 5775 /etc/snort/ +sudo chmod -R 5775 /var/log/snort/ +sudo chmod -R 5775 /usr/local/lib/snort +sudo chmod -R 5775 /usr/local/lib/snort_dynamicrules/ +cd /home/student/snort_src/snort-2.9.9.0/etc +sudo cp -avr *.conf *.map *.dtd /etc/snort/ +sudo cp -avr src/dynamic-preprocessors/build/usr/local/lib/snort_dynamicpreprocessor/* /usr/local/lib/snort_dynamicpreprocessor/ + +mv /home/student/snortrules-snapshot-2990.tar.gz /etc/snort +cd /etc/snort +tar xvfz snortrules-snapshot-2990.tar.gz + +mkdir /home/student/InfectedPcaps +cp /home/student/infected.pcap /home/student/InfectedPcaps + + +############## quagga installation ############### + +cd /usr/share/doc/quagga/examples +sudo chmod * 640 +sudo rename 's/\.conf.sample$/\.conf/' *.conf.sample +sudo cp * /etc/quagga + diff --git a/Computer-Networks/CN_Ubuntu/playbook.yml b/Computer-Networks/CN_Ubuntu/playbook.yml index 0d3c0fa..ae07b70 100644 --- a/Computer-Networks/CN_Ubuntu/playbook.yml +++ b/Computer-Networks/CN_Ubuntu/playbook.yml @@ -1,7 +1,7 @@ --- -- hosts: Computer-Networks +- hosts: Computer-Networks become: yes - tasks: + tasks: - name: Install Software for Computer Networks Lab apt: pkg: "{{ item }}" @@ -22,28 +22,42 @@ - echoping - tftp - telnet - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree + - snmp + - psad + - quagga-doc - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: src: ~/ansible/Computer-Networks/Ubuntu/configuration-files/ dest: /etc/ + - name: Copy installation script + copy: + src: ~/ansible/Computer-Networks/Ubuntu/installation.sh + dest: /tmp/ + + - name: Run the script + shell: sh /tmp/installation.sh - name: Copy Lightdm Configuration files copy: src: ~/ansible/Computer-Networks/Ubuntu/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl disable lightdm.service + + - name: Disable dhcpd + shell: systemctl disable isc-dhcp-server diff --git a/Network-Security/Ext-router/ext-router.yml b/Network-Security/Ext-router/ext-router.yml index 8bd730b..6a21176 100644 --- a/Network-Security/Ext-router/ext-router.yml +++ b/Network-Security/Ext-router/ext-router.yml @@ -23,31 +23,34 @@ - mysql-client - ntp - psad - - bind9 - - bind9utils + - bind9 + - bind9utils - bind9-doc - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: src: ~/ansible/NetSec/Ext-router/configuration-files/ dest: /etc/ - - name: Copy Lightdm Configuration files copy: src: ~/ansible/NetSec/Ext-router/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_item: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl enable lightdm.service + + - name: Enable dhcpd + shell: systemctl enable isc-dhcp-server diff --git a/Network-Security/Int-linux/int-linux.yml b/Network-Security/Int-linux/int-linux.yml index c5ded58..7fdd6bf 100644 --- a/Network-Security/Int-linux/int-linux.yml +++ b/Network-Security/Int-linux/int-linux.yml @@ -23,20 +23,18 @@ - mysql-client - ntp - psad - - bind9 - - bind9utils + - bind9 + - bind9utils - bind9-doc - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: @@ -48,5 +46,11 @@ src: ~/ansible/NetSec/Int-Linux/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl enable lightdm.service + + - name: Enable dhcpd + shell: systemctl enable isc-dhcp-server diff --git a/Network-Security/Int-router/installation.sh b/Network-Security/Int-router/installation.sh new file mode 100644 index 0000000..227cb7c --- /dev/null +++ b/Network-Security/Int-router/installation.sh @@ -0,0 +1,40 @@ +#!/usr/bin/sh +############### snort installation ################# + +sudo apt install -y gcc g++ flex bison libpcap-dev libpcre3-dev autoconf libtool libdumbnet-dev zlib1g-dev pkg-config libssl-dev libpcre3-dev fwsnort +autoreconf -f -i +cd /home/student/ +sudo wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz +sudo wget https://www.snort.org/downloads/snort/snort-2.9.9.0.tar.gz +tar -xvzf daq-2.0.6.tar.gz +tar -xvzf snort-2.9.9.0.tar.gz + +cd /home/student/snort_src/daq-2.0.6 +./configure && make && sudo make install +cd /home/student/snort_src/snort-2.9.9.0 +./configure && make && sudo make install + +sudo ldconfig + +sudo mkdir /etc/snort +sudo mkdir /etc/snort/preproc_rules +sudo mkdir /var/log/snort +sudo mkdir /usr/local/lib/snort_dynamicrules +sudo touch /etc/snort/rules/white_list.rules +sudo touch /etc/snort/rules/black_list.rules +sudo touch /etc/snort/rules/local.rules +sudo chmod -R 5775 /etc/snort/ +sudo chmod -R 5775 /var/log/snort/ +sudo chmod -R 5775 /usr/local/lib/snort +sudo chmod -R 5775 /usr/local/lib/snort_dynamicrules/ +cd /home/student/snort_src/snort-2.9.9.0/etc +sudo cp -avr *.conf *.map *.dtd /etc/snort/ +sudo cp -avr src/dynamic-preprocessors/build/usr/local/lib/snort_dynamicpreprocessor/* /usr/local/lib/snort_dynamicpreprocessor/ + +mv /home/student/snortrules-snapshot-2990.tar.gz /etc/snort +cd /etc/snort +tar xvfz snortrules-snapshot-2990.tar.gz + +mkdir /home/student/InfectedPcaps +cp /home/student/infected.pcap /home/student/InfectedPcaps + diff --git a/Network-Security/Int-router/int-router.yml b/Network-Security/Int-router/int-router.yml index ee7edc6..a69c623 100644 --- a/Network-Security/Int-router/int-router.yml +++ b/Network-Security/Int-router/int-router.yml @@ -23,31 +23,41 @@ - mysql-client - ntp - psad - - bind9 - - bind9utils + - bind9 + - bind9utils - bind9-doc - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager - - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort + - traceroute + - tree - name: Copy Configuration files copy: src: ~/ansible/NetSec/Int-router/configuration-files/ dest: /etc/ + - name: Copy installation.sh file + copy: + src: ~/ansible/NetSec/Int-router/installation.sh + dest: /tmp/ + + - name: Run installation.sh + shell: sh /tmp/installation.sh - name: Copy Lightdm Configuration files copy: src: ~/ansible/NetSec/Int-router/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl enable lightdm.service + + - name: Enable dhcpd + shell: systemctl enable isc-dhcp-server diff --git a/Network-Security/Ubuntu/ubuntu.yml b/Network-Security/Ubuntu/ubuntu.yml index fb8bcf1..2b841d4 100644 --- a/Network-Security/Ubuntu/ubuntu.yml +++ b/Network-Security/Ubuntu/ubuntu.yml @@ -23,20 +23,18 @@ - mysql-client - ntp - psad - - bind9 - - bind9utils + - bind9 + - bind9utils - bind9-doc - - mate-desktop-environment-extras + - mate-desktop-environment-extras - mate-themes - - lightdm - - lightdm-gtk-greeter - - ubuntu-artwork + - lightdm + - lightdm-gtk-greeter + - ubuntu-artwork - update-manager + - traceroute + - tree - #- name: Install snort and fwsnort - # shell: "{{ item }}" - # with_items: - # - DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server ethtool build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev snort fwsnort - name: Copy Configuration files copy: @@ -49,5 +47,11 @@ src: ~/ansible/NetSec/ubuntu/lightdm/ dest: /etc/lightdm/ - - name: Disable lightdm - shell: systemctl disable lightdm.service + - name: Enable lightdm + shell: "{{ item }}" + with_items: + - ln -s /lib/systemd/system/lightdm.service /etc/systemd/systemd/display-manager.service + - systemctl enable lightdm.service + + - name: Enable dhcpd + shell: systemctl enable isc-dhcp-server