Community discussions

MikroTik App
 
tostibrand
just joined
Topic Author
Posts: 2
Joined: Sat Feb 17, 2024 8:57 pm

how to give a container an IP in LAN range?

Tue Feb 20, 2024 12:02 am

Hi,

I've installed pi-hole container and its running on its own IP range of 172.17.0.0/2 with an IP of 172.17.0.2

if i put the DNS setting under DHCP server to 172.17.0.2 it doesnt recieve queries. I need to use the Routers IP (192.168.178.3) along with dst-nat rules to map ports 53 (tcp and udp) and port 80 tcp for admin interface. it works fine

the problem with this is that all DNS queries now come from 1 client on my LAN being 172.17.0.2 (ip assigned to virtual eth interface for the container). I can ping all these networks fine from terminal inside winbox but form any PC on the 192.168.178.0/24 network I cannot ping to 172.17.0.0/24.

I would like to be able to set 172.17.0.2 for DNS and devices actually able to reach it. is that possible?
 
User avatar
baragoon
Member
Member
Posts: 310
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: how to give a container an IP in LAN range?  [SOLVED]

Tue Feb 20, 2024 8:53 am

attach veth to your LAN bridge
 
tangent
Forum Guru
Forum Guru
Posts: 1404
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: how to give a container an IP in LAN range?

Tue Feb 20, 2024 10:12 am

Beware that if you’re using the auto-mac feature on that bridge, the container’s random MAC may get chosen when you do this. That in turn may break static DHCP assignment of the router’s IP, etc.
 
tostibrand
just joined
Topic Author
Posts: 2
Joined: Sat Feb 17, 2024 8:57 pm

Re: how to give a container an IP in LAN range?

Wed Feb 21, 2024 10:20 pm

Adding Veth to the bridge, assigning it an iP adress in the same range of 192.168.178.0/24 and rebooting the router did the trick! thx

Who is online

Users browsing this forum: unhuzpt and 16 guests