Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


pi-hole on nat vps
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

pi-hole on nat vps

sandozsandoz Veteran

Is it possible to run pihole on a cheap nat vps?
I had pihole running on a dedicenter vps, but thats gone....

Comments

  • WSSWSS Member

    Yes. but DNS is hard coded to port 53, so you won't get much luck unless you use IPv6 DNS only.

  • ok
    can anyone recommend a cheap non nat vps for my pihole?

  • WSSWSS Member

    @sandoz said:
    ok
    can anyone recommend a cheap non nat vps for my pihole?

    Phrasing?

    You can probably make due with a cheap-ass host from @Hoost, @MCHPhil, @mikho, or @Virmach.

  • vmhausvmhaus Member, Top Host, Host Rep
    edited January 2018

    @sandoz, our 256MB $15 yearly offers in both UK & US fits your Pi-hole requirement. Comes with a dedicated IPv4 & /64 IPv6 ;)

  • WSSWSS Member

    @vmhaus said:
    @sandoz, our 256MB $15 yearly offers in both UK & US fits your Pi-hole requirement. Comes with a dedicated IPv4 & /64 IPv6 ;)

    Oh yeah. These guys don't suck. I forget about them because shit just works. Sorry about that.

    Thanked by 1vmhaus
  • @sandoz said:
    Is it possible to run pihole on a cheap nat vps?
    I had pihole running on a dedicenter vps, but thats gone....

    Yes, if you can somehow connect your infrastructure to the VPS using a VPN, you can use the internal (VPN) IP address to use for DNS queries.

  • raindog308raindog308 Administrator, Veteran

    WSS said: Yes. but DNS is hard coded to port 53, so you won't get much luck unless you use IPv6 DNS only.

    You can have your DNS server answer on a different port, but that's the easy part. As the article observes, usually you'd do this so you can test a new config with dig or nslookup, but how do you tell your OS to use a different port for DNS (as a DNS client)? I don't know.

    It would be interesting to know how gethostbyname, etc. determine they want to talk to port 53...perhaps it consults (stupid CF WAF) etc services?

  • @raindog308 said:
    You can have your DNS server answer on a different port, but that's the easy part. As the article observes, usually you'd do this so you can test a new config with dig or nslookup, but how do you tell your OS to use a different port for DNS (as a DNS client)? I don't know.

    If you're only using Pi-hole from home or something, you might be able to have your router map the ports (UDP 53 -> UDP [whatever] on the NAT).

  • freerangecloudfreerangecloud Member, Patron Provider

    @Evixo said:

    @sandoz said:
    Is it possible to run pihole on a cheap nat vps?
    I had pihole running on a dedicenter vps, but thats gone....

    Yes, if you can somehow connect your infrastructure to the VPS using a VPN, you can use the internal (VPN) IP address to use for DNS queries.

    ^ This. If you have a public IPv4 at home, you could run an OpenVPN server or similar and have your VPS connect outbound to your home machine. Then you could use private IP addresses routed over the tunnel

  • WSSWSS Member

    @raindog308 said:

    WSS said: Yes. but DNS is hard coded to port 53, so you won't get much luck unless you use IPv6 DNS only.

    You can have your DNS server answer on a different port, but that's the easy part. As the article observes, usually you'd do this so you can test a new config with dig or nslookup, but how do you tell your OS to use a different port for DNS (as a DNS client)? I don't know.

    It would be interesting to know how gethostbyname, etc. determine they want to talk to port 53...perhaps it consults (stupid CF WAF) etc services?

    Well, yeah, binding the daemon to a different port isn't that difficult- at worst case, you edit a config file for virtually all current services.

    Much like FTP, though, when you don't use the default ports (and hack it up to work, even with permissive modes), it generally ends in tears. It'd be easier to just get an IPv4 address.

    @freeerangecloud said:

    @Evixo said:

    @sandoz said:
    Is it possible to run pihole on a cheap nat vps?
    I had pihole running on a dedicenter vps, but thats gone....

    Yes, if you can somehow connect your infrastructure to the VPS using a VPN, you can use the internal (VPN) IP address to use for DNS queries.

    ^ This. If you have a public IPv4 at home, you could run an OpenVPN server or similar and have your VPS connect outbound to your home machine. Then you could use private IP addresses routed over the tunnel

    ..because DNS lookups should take at least a second or two.

  • JustAMacUserJustAMacUser Member
    edited January 2018

    @WSS said:
    ..because DNS lookups should take at least a second or two.

    And I don't think it's been mentioned yet, but running Pi-hole on the LAN is also not a bad idea. You don't have to worry about this IP/port issue and you have the benefit of virtually no latency for (cached) DNS queries. Pi-hole is easy to setup... adding a private VPN just to run it offsite seems unnecessarily complex.

    I run Pi-hole in a container on my home network and it's blazing fast.

    Thanked by 1WSS
  • raindog308raindog308 Administrator, Veteran

    JustAMacUser said: And I don't think it's been mentioned yet, but running Pi-hole on the LAN is also not a bad idea. You don't have to worry about this IP/port issue and you have the benefit of virtually no latency for (cached) DNS queries. Pi-hole is easy to setup... adding a private VPN just to run it offsite seems unnecessarily complex.

    ...unless you want to access it when you're not at home, of course.

    Unfortunately most phone OSes don't seem to give you the option of setting your DNS apart from the dhcp you're given, but a VPN works well.

    JustAMacUser said: I run Pi-hole in a container on my home network and it's blazing fast.

    Yep - runs fine on a tiny VM. Or a pi ;-)

    Thanked by 1JustAMacUser
  • I use pihole through a pi-zero, works a charm.

    Only other alternative would be to create an openvpn server, install pihole on vps, but instead choose pihole to filter tun0 instead of eth0.

  • FHRFHR Member, Host Rep
    edited January 2018

    raindog308 said: Unfortunately most phone OSes don't seem to give you the option of setting your DNS apart from the dhcp you're given, but a VPN works well.

    If you have a rooted Android phone, you can install AdAway. It works by downloading lists of known ad servers (same ones PiHole uses) and appending them to etc/hosts

    It's fantastic.

  • WSSWSS Member

    @FHR said:

    raindog308 said: Unfortunately most phone OSes don't seem to give you the option of setting your DNS apart from the dhcp you're given, but a VPN works well.

    If you have a rooted Android phone, you can install AdAway. It works by downloading lists of known ad servers (same ones PiHole uses) and appending them to etc/hosts

    It's fantastic.

    wget $url -O- >> /emulated/0/penis/etc/hosts

  • @sandoz said:
    ok
    can anyone recommend a cheap non nat vps for my pihole?

    I use aruba.it, (https://www.arubacloud.com/vps/virtual-private-server-range.aspx)
    1E+VAT /month. I actually have two so I can put two IPs in my router. Besides Pihole they run plex and emby.

  • What is your final solution? I only can find cheap nat in my country.

Sign In or Register to comment.