I'm trying to use the dhcp server to create a 10.x.x.x network, with the gateway being 192.168.0.1, (I sadly can't change it as my ISP's router wont let me)
Is there a way to do this
I'm trying to use the dhcp server to create a 10.x.x.x network, with the gateway being 192.168.0.1, (I sadly can't change it as my ISP's router wont let me)
Is there a way to do this
Subnets man, subnets!
I know, is there a way to bridge them or something. or forward like 10.0.0.1 to 192.168.0.1 then set the gateway on the pihole to 10.0.0.1
You'll have to rely on your router to do that, DHCP and DNS don't have anything to do with it.
My router does not have that feature, could I make a virtual adaptor with a different software and forward them
Would probably require hardware networking, like a manageable switch.
I'm not sure.
Could I possibly do something with IPTables, however not sure how well I deals with subnets.
How are you going to prevent clients to see two DHCP servers on the network with iptables on Pi ?
If you cant switch off the DHCP service on the modem/router,
only option is to physically isolate your modem/router from your LAN network
so its not directly connected to your LAN in any way,
and clients wont be able to request DHCP leases from the modem.
Only then you can use your Pi-Hole to hand out 10.0.0.0 DHCP leases for your LAN without conflicting with the modem.
And have another box with two NIC's sit inbetween your LAN and your modem doing forwarding/masquerading (very easy if google).
A Pi is not suitable for forwarding/masqing as it would slow down your internet experience (depending on WAN speed) and
doesnt have two network interfaces (except for Pi3's wifi).
But as a last resort a Pi can be used for masquerading if its got 2 NIC's to separate the modem from LAN.
Or as @Nevexo sugested, use VLAN's on a managed switch.
I agree that this would be the most feasible way in your situation. You set up a computer with two networking cards and install Pi-hole on it. The Pi-hole DHCP server can handle out DHCP leases on the one networking device to which you connect your entire network (use a switch). The other networking card connects to the router. You should be able to find the required routing configuration in a number of tutorials online.
I can disable the DHCP server on the router, I've already done that and I'm using PiHoles DHCP server, it's just the gateway I can't change.
hmm. You'd have to set the gateway for all of your devices, or manually configure the DHCP server to hand out the iP of your gateway. Or buy a new router. Or complain 3 million times in a row (cause that's how many times they need a complaint before caring about it) to Virgin Media
I've tried that with PiHole, the range to give out is 10.0.0.5 to 10.255.255.250 with the gateway as 192.168.0.1 but it doesn't work.
Give out 10.0.0.2 -> 10.0.0.254 instead and try that first before using the extra 10.'s
Plus, static one of your devices on the 10. network to like 10.0.0.23, configure gateway and DNS.
The gateway doesn't need configuring, as its always going to be 192.168.0.1
If you want to setup a "10.0.0.0 / 8" network for LAN without needing another router/gateway, just change the LAN IP address for your modem into for example 10.0.0.1/8 and set that address as a gateway for your clients via DHCP.
Ps. the trailing "/8" means a 255.0.0.0 subnet mask (16,777,216 IP addresses).
As we said, The Virgin Media Super Hubs do not allow their IP address to be changed.
So then why do you want to change your local network? What rfc1918 space you use on your local network has really zero impact on anything. Unless your tying to vpn from or to somewhere that is using the same or overlapping space.
If your current router doesn't support changing its lan IP or local network - then get another router. Pihole has zero to do with any of this.
If you want to create your own diy router with some linux/bsd distro - yeah that works. Then you could install pihole on that device. Or you could just get some off the shelf router and use that.
This really has zero to do with pihole at all.. Also using 10/8 as your local network is just pointless.. if you want to use a 10/24 or /23 or /22 ok - but /8 is HUGE.. Its not a local network mask.. Its a routing summary cidr or say for use in a firewall rule or something. It does not belong on a interface..
All that aside - why do you think you need/want to change away from your 192.168.0/24 network?
I like to staticly assign ips to all devices, and I'm coming up to the 250 ips, would you then recommend me going to 172?
Ok then use a /23 that would give you 510 address to work with. Or use 2 /24's
I think you are confusing the class of the network with how to properly size a network..
Yes the rfc1918 space is
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
If you want to use something in the 10 space sure use 10.0.0.0/23 if you need more than 254 IPs. Or 10.14.56.0/23
Or since your current router does not support changing the network.. Then get a new router, or create your own.. And then use whatever networks you want behind it.. 2 /24's or 3 or 10 or whatever.. My point is /8 is not a interface IP.. That mask allow for 16million IPs... That is not how you do it Anything larger than say a /22 and your going to start running into broadcast issues because that is a lot of devices all broadcasting on the same broadcast domain