Lidux
Anmeldungsdatum: 18. April 2007
Beiträge: 15931
|
Hallo Sashpta, Wozu willst und brauchst du solche Eingriffe ? Erstmal musst du dir den Zusammenhang klar machen. Verwendet das System das alte UPSTART und du nutzt keinen Netzwerkmanager, so werden die Einstellungen in der interface Datei gemacht. auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.102
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 209.222.18.222 209.222.18.218 Willst du den DNS 192.168.2.1 nicht nutzen musst du im Router den DNS Server deaktivieren. Der Resolv Dienst holt sich dann die DNS Server aus dem Netz, nutzt die in der interface Datei bzw. die manuell im Router eingetragenen, d.h. die resolv.conf wird immer wieder neu überschrieben. Willst du dies nicht dann musst du wahrscheinlich diesen komplett deinstallieren bzw. deaktivieren. Bei systemd ist dies etwas anders, d.h. WIKI bzw Netz befragen. Gruss Lidux
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
Lidux schrieb: Hallo Sashpta, Wozu willst und brauchst du solche Eingriffe ? Erstmal musst du dir den Zusammenhang klar machen. Verwendet das System das alte UPSTART und du nutzt keinen Netzwerkmanager, so werden die Einstellungen in der interface Datei gemacht. auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.102
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 209.222.18.222 209.222.18.218 Willst du den DNS 192.168.2.1 nicht nutzen musst du im Router den DNS Server deaktivieren. Der Resolv Dienst holt sich dann die DNS Server aus dem Netz, nutzt die in der interface Datei bzw. die manuell im Router eingetragenen, d.h. die resolv.conf wird immer wieder neu überschrieben. Willst du dies nicht dann musst du wahrscheinlich diesen komplett deinstallieren bzw. deaktivieren. Bei systemd ist dies etwas anders, d.h. WIKI bzw Netz befragen. Gruss Lidux
also kann ich so nicht viel machen, entweder am Router die Einstellungen machen, oder gar nicht ?
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Sashpta schrieb: also kann ich so nicht viel machen, entweder am Router die Einstellungen machen, oder gar nicht ?
Natürlich kannst Du das machen. Du bist doch nicht der 1. und auch nicht der letzte, der dhcpcd und openresolv mit systemd (raspbian-jessie) verwendet. Wenn Du im Router den dhcp-Server deaktivierst, haben evtl. deine anderen Geräte im (W)LAN ein Problem. Poste mal die aktuellen:
cat /etc/dhcpcd.conf
cat /etc/resolvconf.conf
Dateien. EDIT: BTW: Siehe auf deinem PI, auch die Ausgaben von:
man resolvconf.conf
man dhcpcd.conf
(betr. die Syntax dieser conf-Dateien).
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
lubux schrieb: Sashpta schrieb: also kann ich so nicht viel machen, entweder am Router die Einstellungen machen, oder gar nicht ?
Natürlich kannst Du das machen. Du bist doch nicht der 1. und auch nicht der letzte, der dhcpcd und openresolv mit systemd (raspbian-jessie) verwendet. Wenn Du im Router den dhcp-Server deaktivierst, haben evtl. deine anderen Geräte im (W)LAN ein Problem. Poste mal die aktuellen:
cat /etc/dhcpcd.conf
dhcpcd: pi@raspberrypi:~ $ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
209.222.18.222
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname cat /etc/resolvconf.conf
pi@raspberrypi:~ $ cat /etc/resolvconf.conf
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details
resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
# nameserver = 209.222.18.222
nameserver = 209.222.18.222
# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf
BTW: Siehe auf deinem PI, auch die Ausgaben von:
man resolvconf.conf
NAME
resolvconf.conf — resolvconf configuration file
DESCRIPTION
resolvconf.conf is the configuration file for resolvconf(8). The
resolvconf.conf file is a shell script that is sourced by resolvconf(8),
meaning that resolvconf.conf must contain valid shell commands. Listed
below are the standard resolvconf.conf variables that may be set.
After updating this file, you may wish to run resolvconf -u to apply the
new configuration.
name_servers
Prepend name servers to the dynamically generated list. You
should set this to 127.0.0.1 if you use a local name server other
than libc.
name_servers_append
Append name servers to the dynamically generated list.
name_server_blacklist
A list of name servers to be removed from consideration. The
default is 0.0.0.0 as some faulty routers send it via DHCP. To
remove a block, you can use 192.168.*
SUBSCRIBER OPTIONS
openresolv ships with subscribers for the name servers dnsmasq(8),
named(8), pdnsd(8) and unbound(8). Each subscriber can create configura‐
tion files which should be included in in the subscribers main configura‐
tion file.
dnsmasq_conf
This file tells dnsmasq which nameservers to use for specific
domains.
dnsmasq_resolv
This file tells dnsmasq which nameservers to use for global
lookups.
Example resolvconf.conf for dnsmasq:
nameservers=127.0.0.1
dnsmasq_conf=/etc/dnsmasq-conf.conf
dnsmasq_resolv=/etc/dnsmasq-resolv.conf
Example dnsmasq.conf:
listen-address=127.0.0.1
conf-file=/etc/dnsmasq-conf.conf
resolv-file=/etc/dnsmasq-resolv.conf
ich hab jetzt man das, was für DNS zu sein scheint rauskopiert.
Scheint so als ob die Syntax für resolvconf.conf
name_server 1.2.3.4. ist, oder ? man dhcpcd.conf
DESCRIPTION
Although dhcpcd can do everything from the command line, there are cases
where it's just easier to do it once in a configuration file. Most of
the options found in dhcpcd(8) can be used here. The first word on the
line is the option and the rest of the line is the value. Leading and
trailing whitespace for the option and value are trimmed. You can escape
characters in the value using the \ character.
Blank lines and lines starting with # are ignored.
hostname name
Sends hostname to the DHCP server so it can be registered in DNS.
If hostname is an empty string then the current system hostname
is sent. If hostname is a FQDN (ie, contains a .) then it will
be encoded as such.
hostname_short
Sends the short hostname to the DHCP server instead of the FQDN.
This is useful because DHCP servers will not register the FQDN in
their DNS if the domain part does not match theirs.
Also, see the env option above to control how the hostname is set
on the host.
static value
Configures a static value. If you set ip_address then dhcpcd
will not attempt to obtain a lease and just use the value for the
address with an infinite lease time.
Here is an example which configures a static address, routes and
dns.
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
Here is an example for PPP which gives the destination a default
route. It uses the special destination keyword to insert the
destination address into the value.
interface ppp0
static ip_address=
destination routers
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Sashpta schrieb: dhcpcd: pi@raspberrypi:~ $ cat /etc/dhcpcd.conf
# Inform the DHCP server of our hostname for DDNS.
209.222.18.222
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
Ändere die Zeilen:
# 209.222.18.222
hostname
und
#option domain_name_servers, domain_name, domain_search, host_name
option host_name
nooption domain_name_servers, domain_name, domain_search Sashpta schrieb: pi@raspberrypi:~ $ cat /etc/resolvconf.conf
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details
resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
# nameserver = 209.222.18.222
nameserver = 209.222.18.222
# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf
in:
#nameserver = 209.222.18.222
name_servers=209.222.18.222
name_servers_append=8.8.8.8 Reboote nach den Änderungen, deinen PI.
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
lubux schrieb: Ändere die Zeilen:
# 209.222.18.222
hostname
und
#option domain_name_servers, domain_name, domain_search, host_name
option host_name
nooption domain_name_servers, domain_name, domain_search in:
#nameserver = 209.222.18.222
name_servers=209.222.18.222
name_servers_append=8.8.8.8 Reboote nach den Änderungen, deinen PI.
Uhh das hat echt funktioniert, danke ☺
Für das name_servers_append=8.8.8.8 kann ich auch nen anderen nehmen oder ?
meine resolv.conf Datei sieht jetzt so aus:
# Generated by resolvconf
nameserver 209.222.18.222
nameserver 8.8.8.8
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Sashpta schrieb: Für das name_servers_append=8.8.8.8 kann ich auch nen anderen nehmen oder ?
Ja, Du kannst auch einen anderen nehmen.
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
|
Knarf68
Anmeldungsdatum: 14. Mai 2013
Beiträge: 2704
|
Knarf68 schrieb: Wenn es auf dem Raspi das Programm resolvconf nicht gibt, so kannst du die DNS oder was du möchtest in die resolv.conf eintragen. Laut Wiki.
Noch mal das Programm resolvconf darf nicht drauf sein. Ansonsten wird beim nächsten Start die Datei resolv.conf überschrieben. Ob das die anderen DNS Einträge betrifft warte ich ab. ( hcpcd.conf ) Hat sich somit geklärt.
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Knarf68 schrieb: Wurde ja nicht abgeklärt.
Doch, das ist geklärt worden:
pi@raspberrypi:~ $ apt-cache policy resolvconf openresolv dhcpcd
resolvconf:
Installed: (none)
Candidate: 1.76.1
Version table:
1.76.1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
... und der TE hat ja auch schon rebootet.
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
lubux schrieb: der TE hat ja auch schon rebootet.
jap klappt alles perfekt. Auch nach nem Reboot, bin automatisch mit dem VPN Verbunden und Internet geht auch ☺ (siehe Anhang)
- Bilder
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Sashpta schrieb: ..., bin automatisch mit dem VPN Verbunden und Internet geht auch
Wenn Du über das VPN im Internet bist, dann mach mal eine Abfrage der externen IP-Adresse, auf deinem PI mit z. B.:
host -t A myip.opendns.com 208.67.222.222
|
Sashpta
(Themenstarter)
Anmeldungsdatum: 3. März 2016
Beiträge: 81
|
lubux schrieb: Wenn Du über das VPN im Internet bist, dann mach mal eine Abfrage der externen IP-Adresse, auf deinem PI mit z. B.:
host -t A myip.opendns.com 208.67.222.222
ja bin ich, dafür brauchte ich ja den Spaß 😀
pi@raspberrypi:~ $ host -t A myip.opendns.com 208.67.222.222
Using domain server:
Name: 208.67.222.222
Address: 208.67.222.222#53
Aliases:
myip.opendns.com has address 192.40.95.9
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13938
|
Sashpta schrieb: ..., dafür brauchte ich ja den Spaß 😀
... has address 192.40.95.9
OK. ... passt.
|