Last active
April 11, 2023 08:40
-
-
Save thapakazi/1618dd7bd81c6c3a3b16ceaeac9d0f93 to your computer and use it in GitHub Desktop.
Revisions
-
thapakazi revised this gist
Apr 11, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ ansible.builtin.lineinfile: path: /etc/tinyproxy/tinyproxy.conf regexp: '^(Allow)(.*)' line: 'Allow 0.0.0.0/0' insertafter: '^Allow' - name: Adjust Tinyproxy config - Set MaxClients -
thapakazi revised this gist
Apr 11, 2023 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,14 @@ --- # # Install ansible (like in ubuntu): # sudo apt update # sudo apt install software-properties-common # sudo add-apt-repository --yes --update ppa:ansible/ansible # sudo apt install -y ansible # run with pull # ansible-pull -U https://gist.github.com/thapakazi/1618dd7bd81c6c3a3b16ceaeac9d0f93 install-tiny-proxy.yaml -i "localhost," -c local # - name: Install and configure Tinyproxy hosts: all become: yes -
thapakazi created this gist
Apr 11, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ --- - name: Install and configure Tinyproxy hosts: all become: yes tasks: - name: Update apt cache and install Tinyproxy ansible.builtin.apt: name: tinyproxy update_cache: yes state: present - name: Adjust Tinyproxy config - Bind to all interfaces ansible.builtin.lineinfile: path: /etc/tinyproxy/tinyproxy.conf regexp: '^(Bind)(.*)' line: 'Bind 0.0.0.0' - name: Adjust Tinyproxy config - Allow access from specific IP range ansible.builtin.lineinfile: path: /etc/tinyproxy/tinyproxy.conf regexp: '^(Allow)(.*)' line: 'Allow 0.10.0.0/0' insertafter: '^Allow' - name: Adjust Tinyproxy config - Set MaxClients ansible.builtin.lineinfile: path: /etc/tinyproxy/tinyproxy.conf regexp: '^(MaxClients)(.*)' line: 'MaxClients 10000' - name: Create systemd override directory for Tinyproxy ansible.builtin.file: path: /etc/systemd/system/tinyproxy.service.d state: directory mode: '0755' - name: Adjust systemd file for Tinyproxy - Set LimitNOFILE ansible.builtin.blockinfile: path: /etc/systemd/system/tinyproxy.service.d/override.conf block: | [Service] LimitNOFILE=65536 create: yes - name: Reload and restart Tinyproxy ansible.builtin.systemd: name: tinyproxy state: restarted daemon_reload: yes