As explained in the FAQ Nebulo has a non-VPN mode where it does not require the dummy VPN (and thus allows you to use other VPN clients).
As this dummy VPN is normally used to force Android to send all DNS queries to Nebulo you have to configure this yourself.
If your phone is rooted you simply have to enable the iptables setting (which you also only see when your phone is rooted). If you want to know how it works scroll down.
If your phone is not rooted you have to use third-party apps to forward DNS queries to Nebulo.
Use this setting to configure the port Nebulo hosts the DNS server on.
It cannot be lower than 1024
and not higher than 65534
(65534
is the maximum possible value and ports below 1024
are only available to system apps - even with root)
The default is 11053
.
Some apps which can be used to forward the DNS queries from the device to Nebulo in non-VPN mode.
This list is not exhaustive and there might be more apps.
Feel free to let me know if you found another one which does :)
NetGuard is a firewall app you can use to block internet access of apps on your device.
It has a lot of customization options.
By using it together with Nebulo you greatly increase your privacy and security as you now can keep your DNS queries safe while also controlling what your apps do with their internet access.
To combine Nebulo in non-VPN mode with NetGuard, first make sure you have the F-Droid version of NetGuard installed (or the one from their website).
Then follow these steps (Click on the step for a screenshot):
- Open the settings of Netguard, go to Advanced options
- Enable the settings "Filter traffic" and "Filer UDP traffic"
- Click on "Port forwarding"
- Add the following rule (plus button in the top bar):
- Protocol UDP
- Source port: 53
- Destination address: 127.0.0.1
- Destination port: The port you configured in the settings for Nebulos non-VPN mode (default 11053)
- Destination app: nobody
- Repeat, but use TCP as protocol
- Go back to Advanced options
- Scroll down, set both "VPN DNS" fields to
127.0.0.1
- Start both Nebulo (with non-VPN mode enabled) and NetGuard
That's it, now both are running at the same time! You should see the query count increase in Nebulos notification.
RethinkDNS is an app very similar to Nebulo which also offers encrypted DNS and has additional features like a firewall and the capability to use an upstream SOCKS5 proxy. By chaining Nebulo behind RethinkDNS you can keep all features Nebulo offers, whilst also being able to use a firewall or any VPN app which supports SOCKS5, like Orbot. Setting it up is simple:
- Open RethinkDNS, click on the
DNS
setting - Click on configure, select
DNS Proxy
from the drop-down - Click on add, use
127.0.0.1
for IP Address and11053
(or your configured Non-VPN mode port) for port. - Start Nebulo in Non-VPN mode, then start RethinkDNS (5. Not required, but recommended doing) In RethinkDNS, go to settings and exclude Nebulo from Firewall and DNS
Orbot/V2Ray can be used together with Nebulo through RehinkDNS. Follow the steps above, additionally do the following:
- In RethinkDNS, go to settings and exclude Orbot/V2Ray from Firewall and DNS
- Scroll down a bit, enable the
SOCKS5 proxy
andHTTP(S) Proxy
option
- For SOCKS5, set the port to 9050 (10808 if using V2Ray), App to Orbot/V2Ray
- For HTTPS, set the port to 8118 (10809 if using V2Ray), App to Orbot/V2Ray
V2Ray is an app supporting multiple protocols like Shadowsocks to hide your identity and anonymize your browsing.
To use Nebulo with it you manually have to edit your config file to use the DNS server Nebulo hosts in non-VPN mode.
It is available at 127.0.0.1 and the port you configured in the settings (default 11053).
You can use this documentation from V2Ray to see how you have to configure it.
After configuring both apps simply start them and the query count in Nebulos notification should increase.
As this is complicated and cannot be done with V2Rays UI I recommend using RethinkDNS as described above.
There shouldn't be any difference in Nebulos battery usage when using non-VPN mode. If you use third-party apps to forward DNS queries to Nebulo they do use battery though.
As mentioned above you can use iptables on a rooted phone to forward DNS queries to Nebulo in non-VPN mode (iptables mode).
When enabled it creates a few iptable rules when Nebulo is started and removes them when it is stopped.
A notification will appear if anything goes wrong when creating the rules, warning you about it.
At this time close to all devices don't have the proper version of ip6tables to allow Nebulo to forward DNS queries with it.
If your device has IPv6 this most likely causes all DNS queries to bypass Nebulo.
This is of course not desired.
To mitigate this problem I suggest to activate the "Disable IPv6" setting in iptables mode.
It prevents all IPv6 connections on Port 53 (IPv6 connectivity is still going to work!).
This forces Android to fallback to IPv4, where Nebulo is going to receive the queries.
It is recommended to check for iptables support before enabling the iptables mode.
To do that click on the "Check for iptables" entry.
It will tell you whether your device supports iptables, iptables for IPv4 only or doesn't support iptables at all.
The rules Nebulo uses in iptables mode:
- Creating redirect for IPv4:
iptables -t nat -I OUTPUT -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:<port>"
andiptables -t nat -I OUTPUT -p tcp --dport 53 -j DNAT --to-destination 127.0.0.1:<port>"
- Creating redirect for IPv6:
ip6tables -t nat -I PREROUTING -p udp --dport 53 -j DNAT --to-destination [::1]:<port>"
andip6tables -t nat -I PREROUTING -p tcp --dport 53 -j DNAT --to-destination [::1]:<port>"
(As mentioned most devices don't support this command) - Disabling IPv6 for Port 53:
ip6tables -A OUTPUT -p udp --destination-port 53 -j DROP
andip6tables -A OUTPUT -p tcp --destination-port 53 -j DROP
- Removing redirect for IPv4:
iptables -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination <ip>:<port>"
andiptables -t nat -D OUTPUT -p tcp --dport 53 -j DNAT --to-destination <ip>:<port>"
- Removing redirect for IPv6:
ip6tables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to-destination [::1]:<port>
andip6tables -t nat -D PREROUTING -p tcp --dport 53 -j DNAT --to-destination [::1]:<port>
- Re-enabling IPv6 for Port 53:
ip6tables -D OUTPUT -p udp --destination-port 53 -j DROP
andip6tables -D OUTPUT -p tcp --destination-port 53 -j DROP
As mentioned Nebulo automatically cleans up after itself, removing the iptables rules it created.
If Nebulo is force-stopped (either by you or by the system) it isn't able to cleanup after itself.
This causes the rules to remain and because Nebulo doesn't host the DNS server anymore will cause you to not have any connection.
To remove the rules simply open Nebulo again (you don't have to start it, opening the app is enough).
It detects that the rules were not properly removed and will delete them.