Skip to content
Snippets Groups Projects
Select Git revision
  • a031f5591ed2a3ca107e812cf76d9c04eca66ab5
  • main default
  • master protected
  • ci_2025
  • review_2025
  • 2023
6 results

ubuntu-shellinabox.yaml

Blame
  • ubuntu-shellinabox.yaml 654 B
    - hosts: all
      tasks:
    
      - name: Update the system
        apt:
          upgrade: dist
    
      - name: Install requirements
        apt:
          name: 
            - openssl
            - shellinabox
            - stress
          state: latest
    
      - name: Configure shell in a box 
        shell: sed -i 's|SHELLINABOX_PORT=4200|SHELLINABOX_PORT=443|' /etc/default/shellinabox
    
      - name: Configure network
        shell: iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT && iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT && iptables-save
    
      - name: Restart services
        systemd:
          name: "{{ item }}" 
          enabled: yes
          state: restarted
        loop:
          - shellinabox