brak połączenia po starcie systemu [Linux] |
Autor |
Wiadomość |
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 14:46 brak połączenia po starcie systemu [Linux]
|
|
|
Witam
Używam Linuksa z KDE. Czasem po starcie systemu nie mam połączenia. Używam UPC i wszystko się automatycznie konfiguruje przy instalacji systemu, sam się w tym nie grzebałem.
Osoba, której to zgłosiłem mi odpisała:
Cytat: | I am looking at the logs you sent me and those lines looks odd to me:
cat /etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1
That can only works if your computer is a name server, a configuration that is rarely used and can cause the problem you have. Without a valid nameserver even if you dsl connection is working properly you will not be able to access any site from Internet. Can you check in your dsl modem that the DNS part is poperly configurated? |
Widzę, że jest jakiś temat o DNS, ale stary i nie bardzo wiem jak ma wyglądać poprawna konfiguracja modemu. Nic w nim nie zmieniałem poza hasłem administratora, bo się nie znam na tym.
Co mogę sprawdzić? |
|
|
|
|
Susane [Usunięty]
|
Wysłany: 06-06-2015, 15:03
|
|
|
Cytat: | Co mogę sprawdzić? | Kiedy występuje problem w oknie terminala:
Kod: | su
ip a
route -n
ifconfig
cat /etc/resolv.conf | Poprawnie skonfigurowane DNS`y w resolv.conf wyglądają przykładowo tak: Kod: | domain chello.pl
nameserver 62.179.1.71
nameserver 62.179.1.60
nameserver 62.179.1.61 | Poprawność działania DNS sprawdzisz poleceniem:
[ Dodano: 06-06-2015, 15:05 ]
sabayon napisał/a: | nie bardzo wiem jak ma wyglądać poprawna konfiguracja modemu | Adres powinien być pobierany automatycznie przez DHCP. |
|
|
|
|
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 16:51
|
|
|
Wynik polecenia kiedy internet działa
Kod: |
nslookup upc.pl
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: upc.pl
Address: 84.116.34.9
|
Czy to dobry wynik?
Czy podane przez ciebie DNS moge poprostu wkleić w resolv.conf zamiast tego
nameserver 127.0.1.1 |
|
|
|
|
Susane [Usunięty]
|
Wysłany: 06-06-2015, 17:22
|
|
|
sabayon napisał/a: | Czy to dobry wynik? | Dobry w tym sensie, że DNS działa. Natomiast adres 127.0.1.1 wskazuje tu na działanie programu Dnsmasq. Czy faktycznie tak jest sprawdzisz poleceniem: Kod: | su
ps aux | grep dnsmasq
ps -ef|grep dnsmasq |
sabayon napisał/a: | Czy podane przez ciebie DNS moge poprostu wkleić w resolv.conf zamiast tego
nameserver 127.0.1.1 | Można, ale taka zmiana jest nadpisywana przez klienty DHCP. Raczej trzeba wymusić w konfiguracji, aby adres 127.0.1.1 nie był tam dodawany. Oczywiście podpowiadam wróżąc, bo nie wiem jaka to konkretnie wersja Linuxa i w jaki sposób skonfigurowana do obsługi sieci (przez network manager, czy networking, jaki firewall i inne powiązane rzeczy). Być może Dnsmasq po prostu tylko się zawiesza i wystarczy restart tej usługi. Ustal najpierw, czy w ogóle adres jest prawidłowo przydzielany po starcie systemu i czy faktycznie DNS działa (ifconfig i nslookup). Działanie firewalla sprawdzisz poleceniem:
Być może on też dokłada swoje trzy grosze więc warto podejrzeć, kiedy jest problem. |
|
|
|
|
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 17:46
|
|
|
Trochę nie rozumiem co piszesz, ale wklejam wynik poleceń. System to Kubuntu.
Kod: | sudo ps aux | grep dnsmasq
nobody 1669 0.0 0.0 32244 1548 ? S 16:16 0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
yellow 3339 0.0 0.0 12984 928 pts/6 S+ 17:31 0:00 grep --color=auto dnsmasq
sudo ps -ef|grep dnsmasq
nobody 1669 797 0 16:16 ? 00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
yellow 3354 3319 0 17:31 pts/6 00:00:00 grep --color=auto dnsmasq
ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:e6:de:66:a2
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::216:e6ff:fede:66a2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:75222 errors:0 dropped:0 overruns:0 frame:0
TX packets:42832 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:99317906 (99.3 MB) TX bytes:3969648 (3.9 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1966 errors:0 dropped:0 overruns:0 frame:0
TX packets:1966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:189699 (189.6 KB) TX bytes:189699 (189.6 KB)
nslookup
>
>
> q
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find q: NXDOMAIN
(nie wiedziałem co zrobić, bo po enterze nic sensownego nie pokazał)
nslookup -type=any google.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
google.com mail exchanger = 40 alt3.aspmx.l.google.com.
google.com nameserver = ns3.google.com.
google.com mail exchanger = 10 aspmx.l.google.com.
google.com
origin = ns1.google.com
mail addr = dns-admin.google.com
serial = 95360860
refresh = 7200
retry = 1800
expire = 1209600
minimum = 300
google.com mail exchanger = 50 alt4.aspmx.l.google.com.
google.com has AAAA address 2a00:1450:401b:800::200e
google.com mail exchanger = 30 alt2.aspmx.l.google.com.
google.com mail exchanger = 20 alt1.aspmx.l.google.com.
google.com nameserver = ns4.google.com.
google.com nameserver = ns2.google.com.
google.com nameserver = ns1.google.com.
Authoritative answers can be found from:
iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
ufw-track-forward all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere
Chain ufw-after-forward (1 references)
target prot opt source destination
Chain ufw-after-input (1 references)
target prot opt source destination
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-ns
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-dgm
ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:netbios-ssn
ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:microsoft-ds
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootps
ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootpc
ufw-skip-to-policy-input all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-input (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-output (1 references)
target prot opt source destination
Chain ufw-after-output (1 references)
target prot opt source destination
Chain ufw-before-forward (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp source-quench
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
ACCEPT icmp -- anywhere anywhere icmp echo-request
ufw-user-forward all -- anywhere anywhere
Chain ufw-before-input (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ufw-logging-deny all -- anywhere anywhere ctstate INVALID
DROP all -- anywhere anywhere ctstate INVALID
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp source-quench
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc
ufw-not-local all -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere 239.255.255.250 udp dpt:1900
ufw-user-input all -- anywhere anywhere
Chain ufw-before-logging-forward (1 references)
target prot opt source destination
Chain ufw-before-logging-input (1 references)
target prot opt source destination
Chain ufw-before-logging-output (1 references)
target prot opt source destination
Chain ufw-before-output (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ufw-user-output all -- anywhere anywhere
Chain ufw-logging-allow (0 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW ALLOW] "
Chain ufw-logging-deny (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere ctstate INVALID limit: avg 3/min burst 10
LOG all -- anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-not-local (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
RETURN all -- anywhere anywhere ADDRTYPE match dst-type MULTICAST
RETURN all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST
ufw-logging-deny all -- anywhere anywhere limit: avg 3/min burst 10
DROP all -- anywhere anywhere
Chain ufw-reject-forward (1 references)
target prot opt source destination
Chain ufw-reject-input (1 references)
target prot opt source destination
Chain ufw-reject-output (1 references)
target prot opt source destination
Chain ufw-skip-to-policy-forward (0 references)
target prot opt source destination
DROP all -- anywhere anywhere
Chain ufw-skip-to-policy-input (7 references)
target prot opt source destination
DROP all -- anywhere anywhere
Chain ufw-skip-to-policy-output (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain ufw-track-forward (1 references)
target prot opt source destination
Chain ufw-track-input (1 references)
target prot opt source destination
Chain ufw-track-output (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere ctstate NEW
ACCEPT udp -- anywhere anywhere ctstate NEW
Chain ufw-user-forward (1 references)
target prot opt source destination
Chain ufw-user-input (1 references)
target prot opt source destination
Chain ufw-user-limit (0 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] "
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain ufw-user-logging-forward (0 references)
target prot opt source destination
Chain ufw-user-logging-input (0 references)
target prot opt source destination
Chain ufw-user-logging-output (0 references)
target prot opt source destination
Chain ufw-user-output (1 references)
target prot opt source destination
|
|
|
|
|
|
Susane [Usunięty]
|
Wysłany: 06-06-2015, 18:11
|
|
|
Wygląda na to, że masz tam nie zwykły modem, ale router (Thomson, Technicolor, Ubee lub inny, własny), a sieć jest zarządzana przez Network Managera - poszukaj ikonki sieci na panelu, pulpicie lub w menu. W takim razie można w ogóle IP i DNS przypisać na sztywno i zniknie problem z pobieraniem. Potwierdź, czy moje przypuszczenia odpowiadają rzeczywistości to napiszę konkretnie jak to ustawić. |
|
|
|
|
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 18:53
|
|
|
Potwierdzam. Mam Technicolor TC7200.U
Używam KDE 4.13.2 menadżer sieci 0.9.8.8 |
|
|
|
|
hsurim
ultra master
Pomógł: 12 razy Dołączył: 04 Mar 2009 Posty: 1215 Skąd: Warszawa
|
Wysłany: 06-06-2015, 19:45
|
|
|
Spróbuj (najprościej) usunąć konfigurację połączenia przewodowego, aby potem system ją sam na nowo utworzył. |
|
|
|
|
Susane [Usunięty]
|
Wysłany: 06-06-2015, 19:47
|
|
|
Kod: | su
/usr/bin/nm-connection-editor | I wpisujesz wartości dla eth0 w ustawieniach IPv4 takie jak na screenie z załącznika. Adresy DNS rozdzielone są przecinkiem.
[ Dodano: 06-06-2015, 20:25 ]
IPv6 ustaw na ignorowanie:
nm2.jpg Network Manager - ustawienie IPv6 i DNS na sztywno. |
|
Plik ściągnięto 45 raz(y) 22,99 KB |
nm.jpg Network Manager - ustawienie IPv4 i DNS na sztywno. |
|
Plik ściągnięto 46 raz(y) 55,59 KB |
|
|
|
|
|
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 20:28
|
|
|
Wpisałem tak i działa.
Chociaż resolv.conf dalej pokazuje 127.0.1.1
Kod: | cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1 |
Czy to jeszcze ma jakieś znaczenie?
Czy ktoś inny kto widzi moje dane też może sobie wpisać taki sam adres, czy to wybrałaś wg. jakichś zasad?
Zastanawiam się czy pokazywanie tylu danych (t. adresu razem z konfiguracją firewalla) jest bezpieczne? |
|
|
|
|
Susane [Usunięty]
|
Wysłany: 06-06-2015, 21:08
|
|
|
sabayon napisał/a: | resolv.conf dalej pokazuje 127.0.1.1 |
sabayon napisał/a: | Czy to jeszcze ma jakieś znaczenie? | To wymusza Dnsmasq i może zostać, bo w takim układzie ma nawet swoje plusy, można nawet dodać jeszcze DNS UPC: 62.179.1.71 jako kolejny. Natomiast w razie powrotu kłopotów - Dnsmasq wyłączyć lub całkiem odinstalować.
[ Dodano: 06-06-2015, 21:27 ]
sabayon napisał/a: | Czy ktoś inny kto widzi moje dane też może sobie wpisać taki sam adres, czy to wybrałaś wg. jakichś zasad?
Zastanawiam się czy pokazywanie tylu danych (t. adresu razem z konfiguracją firewalla) jest bezpieczne? | Jesteś zupełnie bezpieczny i anonimowy
Przykładowy 192.168.0.245 to adres lokalny, a nie internetowy więc jeśli komuś nie koliduje i pasuje podsieć też może sobie taki ustawić. |
|
|
|
|
sabayon
easy master
Dołączył: 07 Sty 2011 Posty: 20
|
Wysłany: 06-06-2015, 21:55
|
|
|
To świetnie.
Bardzo dziękuję za pomoc. |
|
|
|
|
|