[Solved] DHCP IP Address with Static DNS Possible?
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
[Solved] DHCP IP Address with Static DNS Possible?
Is it possible to set static and over riding DNS settings while still using DHCP to obtain an IP address? This would be useful in order to use OpenDNS, Norton ConnectSafe (aka Norton DNS), or other DNS servers to over ride the DNS servers handed out by your ISP for increased security and content filtering. It would be great if this function could be rolled into the Kiosk Wizard.
Thank you for a great product!
Thank you for a great product!
Last edited by jmalon on 17 Oct 2014, 22:11, edited 1 time in total.
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: DHCP IP Address with Static (Over riding) DNS Possible?
hello John,
doing this on the kiosk level is not that easy.
maybe you could specify a DNS server in your dhcpc daemon config? for example in case of dnsmasq you would have to add:
as per:
http://serverfault.com/questions/163542 ... ns-servers
which dhcpc software are you using?
doing this on the kiosk level is not that easy.
maybe you could specify a DNS server in your dhcpc daemon config? for example in case of dnsmasq you would have to add:
Code: Select all
dhcp-option=6,192.168.0.90,192.168.0.98
http://serverfault.com/questions/163542 ... ns-servers
which dhcpc software are you using?
Please add [Solved] to your thread title if the solution was found.
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
Re: DHCP IP Address with Static (Over riding) DNS Possible?
You could add an entry at the top of the /etc/resolv.conf file to specify the DNS servers you want to use, i.e. OpenDNS or Norton ConnectSafe. Would this not override the DNS servers assigned by the network's DHCP server?
Resolv.conf
https://wiki.archlinux.org/index.php/resolv.conf
Alternative DNS servers
To use alternative DNS servers, edit /etc/resolv.conf and add them to the top of the file so they are used first, optionally removing or commenting out already listed servers.
Note: Changes made to /etc/resolv.conf take effect immediately.
The DHCP client software is whatever is built into the Porteus Kiosk.
Resolv.conf
https://wiki.archlinux.org/index.php/resolv.conf
Alternative DNS servers
To use alternative DNS servers, edit /etc/resolv.conf and add them to the top of the file so they are used first, optionally removing or commenting out already listed servers.
Note: Changes made to /etc/resolv.conf take effect immediately.
The DHCP client software is whatever is built into the Porteus Kiosk.
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: DHCP IP Address with Static (Over riding) DNS Possible?
sorry - i probably was not clear enough.
i meant that you could edit a settings of your dhcpc server and add specific DNS IPs which should be assigned to the clients:
http://www.yolinux.com/TUTORIALS/DHCP-Server.html
please mind:
if you want to keep these DNS just for the kiosk PCs then you could filter them by MAC addresses:
i guess that adding 'domain-name-servers 40.175.42.254, 40.175.42.253;' to this block would affect just this particular PC.
i doubt many users would benefit if i implement static DNS on the client side. you are first one asking for this in the whole kiosk history and i dont want to overload wizard with too many less important features (it looks complicated already and new features are on the way).
i meant that you could edit a settings of your dhcpc server and add specific DNS IPs which should be assigned to the clients:
http://www.yolinux.com/TUTORIALS/DHCP-Server.html
please mind:
Code: Select all
option domain-name "your-domain.org";
option domain-name-servers 40.175.42.254, 40.175.42.253; # Default DNS to be used by DHCP clients
Code: Select all
host ns2 {
next-server ns2.your-domain.com;
hardware ethernet 00:02:c3:d0:e5:83;
fixed-address 40.175.42.254;
}
i doubt many users would benefit if i implement static DNS on the client side. you are first one asking for this in the whole kiosk history and i dont want to overload wizard with too many less important features (it looks complicated already and new features are on the way).
Please add [Solved] to your thread title if the solution was found.
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
Re: DHCP IP Address with Static (Over riding) DNS Possible?
Without using the kiosk wizard, how would I accomplish the task of over riding the DNS servers provided by the DHCP server?
I created a resolv.conf file in /etc (see below). I could browse the Internet, but the Norton ConnectSafe name servers were not used because I could still get to elephantlist.org, so I assume other sites would be viewable.
I also tried adding echo statements to /etc/rc.d/rc.local to create entries in the /etc/resolv.conf on startup. Again, I could browse the Internet, but the Norton ConnectSafe name servers were not used.
Any suggestions? Thank you for your help!
I created a resolv.conf file in /etc (see below). I could browse the Internet, but the Norton ConnectSafe name servers were not used because I could still get to elephantlist.org, so I assume other sites would be viewable.
Code: Select all
cat resolv.conf
# Norton ConnectSafe name servers
# https://dns.norton.com/faq.html
# Policy 1: Security (199.85.126.10 and 199.85.127.10)
# Policy 2: Security + Pornography (199.85.126.20 and 199.85.127.20)
# Policy 3: Security + Pornography + Other (199.85.126.30 and 199.85.127.30)
nameserver 199.85.126.30
nameserver 199.85.127.30
Code: Select all
#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here and make this
# script executable.
echo 'nameserver 199.85.126.30' > /etc/resolv.conf
echo 'nameserver 199.85.127.30' >> /etc/resolv.conf
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: DHCP IP Address with Static (Over riding) DNS Possible?
hi John,
a) please create /etc/resolv.conf containing your static DNS settings
b) take /etc/dhcpcd.conf from 003-settings.xzm and add to it:
(this will disable dhcpcd from overriding /etc/resolv.conf)
c) create module containing these two files and add it to your remastered kiosk ISO
that should do it.
a) please create /etc/resolv.conf containing your static DNS settings
b) take /etc/dhcpcd.conf from 003-settings.xzm and add to it:
Code: Select all
nohook resolv.conf
c) create module containing these two files and add it to your remastered kiosk ISO
that should do it.
Please add [Solved] to your thread title if the solution was found.
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
Re: DHCP IP Address with Static (Over riding) DNS Possible?
I'll give it a try and let you know. Thank you again for your help!
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
Re: DHCP IP Address with Static (Over riding) DNS Possible?
Is /etc/dhcocd.conf in the 001-core.xzm, instead of 003-settings.xzm?
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
[Solved] DHCP IP Address with Static (Over riding) DNS Possi
Great, that worked. Thank you so much!!!
Here are the steps for anyone else wanting to accomplish the same thing.
1. I created /etc/resolv.conf
2. I unsquahed /etc/dhcpcd.conf from 001-core.xzm and added "nohook resolv.conf" to the end of it.
3. I placed both of these files into an unsquashed 003-settings.xzm file in the /etc directory.
4. I removed the old 003-settings.xzm file and resquashed squashfs-root into 003-settings.xzm.
5. After creating the new ISO and writing it to a flash drive, I booted to it. I was blocked by Norton ConnectSafe from browsing to elephantlist.org!!!!
Thank you again!
Here are the steps for anyone else wanting to accomplish the same thing.
1. I created /etc/resolv.conf
Code: Select all
cat resolv.conf
# Norton ConnectSafe name servers
# https://dns.norton.com/faq.html
# Policy 1: Security (199.85.126.10 and 199.85.127.10)
# Policy 2: Security + Pornography (199.85.126.20 and 199.85.127.20)
# Policy 3: Security + Pornography + Other (199.85.126.30 and 199.85.127.30)
nameserver 199.85.126.30
nameserver 199.85.127.30
3. I placed both of these files into an unsquashed 003-settings.xzm file in the /etc directory.
4. I removed the old 003-settings.xzm file and resquashed squashfs-root into 003-settings.xzm.
5. After creating the new ISO and writing it to a flash drive, I booted to it. I was blocked by Norton ConnectSafe from browsing to elephantlist.org!!!!
Thank you again!
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Solved] DHCP IP Address with Static DNS Possible?
you must be using older version of kiosk, in latest one it's placed in 003-setings.xzmI unsquahed /etc/dhcpcd.conf from 001-core.xzm
it would be better to keep all your custom tweaks in a separated module like: my_settings.xzm so in case of kiosk upgrade you would have to copy that single module to new ISO.I removed the old 003-settings.xzm file and resquashed squashfs-root into 003-settings.xzm.
thanks
Please add [Solved] to your thread title if the solution was found.
-
- Black ninja
- Posts: 78
- Joined: 21 Mar 2013, 19:39
- Distribution: Linux Mint
- Location: Collinsville, OK
Re: [Solved] DHCP IP Address with Static DNS Possible?
I was using PKE 3.1.1.
Good idea. Do I control the load order for my_settings.xzm by the number in front of it, so it would have to be something like 010_my_settings.xzm?
Good idea. Do I control the load order for my_settings.xzm by the number in front of it, so it would have to be something like 010_my_settings.xzm?
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Solved] DHCP IP Address with Static DNS Possible?
3.1.1 is old now 
yes - you can set the loading order with numbers. or just give it no number so it will be last (letters goes after numbers).

yes - you can set the loading order with numbers. or just give it no number so it will be last (letters goes after numbers).
Please add [Solved] to your thread title if the solution was found.
Re: [Solved] DHCP IP Address with Static DNS Possible?
I need a more step by step explanation of how to change the resolve.conf. How do I get to that file?
Apologies since I am a total N00B to Porteus and Linux.
Apologies since I am a total N00B to Porteus and Linux.
- fanthom
- Moderator Team
- Posts: 5590
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Solved] DHCP IP Address with Static DNS Possible?
Please add [Solved] to your thread title if the solution was found.