Code Monkey home page Code Monkey logo

Comments (11)

YSpoof avatar YSpoof commented on May 24, 2024

Also, NGINX try to start on port 80 but I have Apache running, so I've needed to manually edit the NGINX config and remove that, maybe some option during the setup to ask if the user wants that ;)

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

BTW, Android still can't connect :( I dunno why.

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

2021/10/06 10:59:00 [error] 830507#830507: *27 upstream timed out (110: Connection timed out) while proxying connection, client: HIDDEN_IP, server: 0.0.0.0:853, upstream: "127.0.0.1:53", bytes from/to client:56/0, bytes from/to upstream:0/0

from secure-adblocking-dns.

clayauld avatar clayauld commented on May 24, 2024

Thanks for the feedback. I'll run tests and fix the script. I posted the changes without adequate testing, and was hoping it would "just work". Looks like I need to fix it!

And, yes, I'd like to add some options in the install script, including asking for the correct domain name for the VPS or server, nginx port, etc. I put the script together kinda quickly, so it was a first attempt.

Feel free to make changes to the script and fix it if you have time. I can merge PRs quickly if you have the time to create one.

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

Remove line 14 from NGinx Install.sh

"systemctl restart nginx"

Since the user will need to setup the certificate and the script will throw an error:

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

from secure-adblocking-dns.

clayauld avatar clayauld commented on May 24, 2024

I updated the install script with your suggestions.

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

Cool, I c, now what would be awesome is the script pulling 2 nginx.conf, 1 for people who is already running another service on port 80 ( the warning u put is good, but people need to manuallly remove the http block from nginx.conf ) with http block removed from the nginx.conf, and other for people not running any service on port 80 ( the one u already have ).

from secure-adblocking-dns.

YSpoof avatar YSpoof commented on May 24, 2024

@clayauld need to chmod +x /usr/local/bin/transparent-proxy inside the install.sh :

root@cenarioserver /home/zero 29s
❯ systemctl status transparent-proxy.service
● transparent-proxy.service - A script to enable transparent Nginx proxy
Loaded: loaded (/lib/systemd/system/transparent-proxy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-10-13 21:43:23 -03; 36s ago
Process: 627444 ExecStart=/usr/local/bin/transparent-proxy (code=exited, status=203/EXEC)
Main PID: 627444 (code=exited, status=203/EXEC)
CPU: 1ms

out 13 21:43:23 cenarioserver systemd[1]: Started A script to enable transparent Nginx proxy.
out 13 21:43:23 cenarioserver systemd[627444]: transparent-proxy.service: Failed to locate executable /usr/local/bin/transparent-proxy: Permission denied
out 13 21:43:23 cenarioserver systemd[627444]: transparent-proxy.service: Failed at step EXEC spawning /usr/local/bin/transparent-proxy: Permission denied
out 13 21:43:23 cenarioserver systemd[1]: transparent-proxy.service: Main process exited, code=exited, status=203/EXEC
out 13 21:43:23 cenarioserver systemd[1]: transparent-proxy.service: Failed with result 'exit-code'.

C this line :

out 13 21:43:23 cenarioserver systemd[627444]: transparent-proxy.service: Failed at step EXEC spawning /usr/local/bin/transparent-proxy: Permission denied

and after chmodding it, it works but if there are some way to fix this :

out 13 21:47:16 cenarioserver systemd[1]: transparent-proxy.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
out 13 21:47:16 cenarioserver systemd[1]: transparent-proxy.service: Failed with result 'exit-code'.

BTW appending exit 0 to transparent-proxy doesn't solve that status=2.

from secure-adblocking-dns.

clayauld avatar clayauld commented on May 24, 2024

I updated the install script with the suggested line. When I run the command sudo systemctl status transparent-proxy I get the following log:

● transparent-proxy.service - A script to enable transparent Nginx proxy
     Loaded: loaded (/lib/systemd/system/transparent-proxy.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Wed 2021-10-13 17:56:00 AKDT; 2min 16s ago
   Main PID: 985 (code=exited, status=0/SUCCESS)

Oct 13 17:56:00 dns1.pi.hole systemd[1]: Started A script to enable transparent Nginx proxy.
Oct 13 17:56:00 dns1.pi.hole transparent-proxy[986]: net.ipv4.conf.default.route_localnet = 1
Oct 13 17:56:00 dns1.pi.hole transparent-proxy[987]: net.ipv4.conf.all.route_localnet = 1
Oct 13 17:56:00 dns1.pi.hole systemd[1]: transparent-proxy.service: Succeeded.

This is the expected behavior as the service only needs to run the script once on boot. There should be no ongoing, active service in the background.

After you make sure the executable has the 'exec' flag set, reboot your system and see if the service gives you the same error.

from secure-adblocking-dns.

clayauld avatar clayauld commented on May 24, 2024

Cool, I c, now what would be awesome is the script pulling 2 nginx.conf, 1 for people who is already running another service on port 80 ( the warning u put is good, but people need to manuallly remove the http block from nginx.conf ) with http block removed from the nginx.conf, and other for people not running any service on port 80 ( the one u already have ).

I'll see about adding this as an option. It may take a bit for me to get it done and uploaded.

from secure-adblocking-dns.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.