Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Internet a sítě => Téma založeno: mka 11 Listopadu 2009, 13:37:31
-
Zdravím,
po přechodu na KK mám opět problémy s připojením k počítači s Wokny přes smb. A opět v tom má prsty firewall. V JJ jsem musel povolit porty 137 a 138 pro udp a 139 a 445 pro tcp, v KK je to opět málo. Stačí vypnout firewall a jede to. A jede to ještě i nějaký čas po opětovném zapnutí fw, což mi přijde zábavné.
Nic jsem nikde nevygůglil; konec konců, KK je ještě maličká. Nějaké nápady?
Děkuji.
-
Já už snad u mě ani pořádně nepamatuju problémy se sítí, ale ono to bude nejspíš tím, že mám výchozí nastavení FW, což znamená žádné :-) Není to sice dobře,ale asi mě to nedonutí, dokud se nic nestane.. Nastavení iptables? Nějak mi nesedí, že i po zapnutí fw to chvíli jede.. To smrdí nějakou MicroSoftowinou :-)
sudo iptables -v -L
EDIT: Tak teď jsem se zkoušel s KK připojit na widle a ejhle, ono to opravdu nejede. To zas vypadá na bug nebo na absenci nějakého balíku
-
Posílám výpis, je trochu ukecaný:
Chain INPUT (policy DROP 2 packets, 662 bytes)
pkts bytes target prot opt in out source destination
417K 396M ufw-before-logging-input all -- any any anywhere anywhere
417K 396M ufw-before-input all -- any any anywhere anywhere
2 662 ufw-after-input all -- any any anywhere anywhere
2 662 ufw-after-logging-input all -- any any anywhere anywhere
2 662 ufw-reject-input all -- any any anywhere anywhere
2 662 ufw-track-input all -- any any anywhere anywhere
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ufw-before-logging-forward all -- any any anywhere anywhere
0 0 ufw-before-forward all -- any any anywhere anywhere
0 0 ufw-after-forward all -- any any anywhere anywhere
0 0 ufw-after-logging-forward all -- any any anywhere anywhere
0 0 ufw-reject-forward all -- any any anywhere anywhere
Chain OUTPUT (policy ACCEPT 881 packets, 28256 bytes)
pkts bytes target prot opt in out source destination
369K 27M ufw-before-logging-output all -- any any anywhere anywhere
369K 27M ufw-before-output all -- any any anywhere anywhere
80468 4675K ufw-after-output all -- any any anywhere anywhere
80468 4675K ufw-after-logging-output all -- any any anywhere anywhere
80468 4675K ufw-reject-output all -- any any anywhere anywhere
80468 4675K ufw-track-output all -- any any anywhere anywhere
Chain ufw-after-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-input (1 references)
pkts bytes target prot opt in out source destination
0 0 RETURN udp -- any any anywhere anywhere udp dpt:netbios-ns
0 0 RETURN udp -- any any anywhere anywhere udp dpt:netbios-dgm
0 0 RETURN tcp -- any any anywhere anywhere tcp dpt:netbios-ssn
0 0 RETURN tcp -- any any anywhere anywhere tcp dpt:microsoft-ds
2 662 RETURN udp -- any any anywhere anywhere udp dpt:bootps
0 0 RETURN udp -- any any anywhere anywhere udp dpt:bootpc
0 0 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-logging-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-forward (1 references)
pkts bytes target prot opt in out source destination
0 0 ufw-user-forward all -- any any anywhere anywhere
Chain ufw-before-input (1 references)
pkts bytes target prot opt in out source destination
2 100 ACCEPT all -- lo any anywhere anywhere
415K 396M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
10 400 ufw-logging-deny all -- any any anywhere anywhere state INVALID
10 400 DROP all -- any any anywhere anywhere state INVALID
0 0 ACCEPT icmp -- any any anywhere anywhere icmp destination-unreachable
0 0 ACCEPT icmp -- any any anywhere anywhere icmp source-quench
0 0 ACCEPT icmp -- any any anywhere anywhere icmp time-exceeded
0 0 ACCEPT icmp -- any any anywhere anywhere icmp parameter-problem
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:bootps dpt:bootpc
1972 90418 ufw-not-local all -- any any anywhere anywhere
0 0 ACCEPT all -- any any BASE-ADDRESS.MCAST.NET/4 anywhere
1795 57875 ACCEPT all -- any any anywhere BASE-ADDRESS.MCAST.NET/4
177 32543 ufw-user-input all -- any any anywhere anywhere
Chain ufw-before-logging-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-output (1 references)
pkts bytes target prot opt in out source destination
2 100 ACCEPT all -- any lo anywhere anywhere
288K 22M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
80468 4675K ufw-user-output all -- any any anywhere anywhere
Chain ufw-logging-allow (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-logging-deny (2 references)
pkts bytes target prot opt in out source destination
Chain ufw-not-local (1 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type LOCAL
1795 57875 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type MULTICAST
177 32543 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
0 0 ufw-logging-deny all -- any any anywhere anywhere limit: avg 3/min burst 10
0 0 DROP all -- any any anywhere anywhere
Chain ufw-reject-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-output (1 references)
pkts bytes target prot opt in out source destination
4521 271K ACCEPT tcp -- any any anywhere anywhere state NEW
75066 4375K ACCEPT udp -- any any anywhere anywhere state NEW
Chain ufw-user-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-input (1 references)
pkts bytes target prot opt in out source destination
60 5652 ACCEPT udp -- any any anywhere anywhere udp spt:netbios-ns dpt:netbios-ns
115 26229 ACCEPT udp -- any any anywhere anywhere udp spt:netbios-dgm dpt:netbios-dgm
0 0 ACCEPT tcp -- any any anywhere anywhere tcp spt:netbios-ssn dpt:netbios-ssn
0 0 ACCEPT tcp -- any any anywhere anywhere tcp spt:microsoft-ds dpt:microsoft-ds
Chain ufw-user-limit (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 5 LOG level warning prefix `[UFW LIMIT BLOCK] '
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere
Chain ufw-user-logging-forward (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-input (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-output (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-output (1 references)
pkts bytes target prot opt in out source destination
-
Tak u mě jsem to zprovoznil, byla to ale "chybka" na straně widláckého FW... U tebe jen přijít na to, která služba v iptables to blokuje. Asi bych na to šel vyřazovacím způsobem. Když máš aktivní FW a nejde se připojit na widle, jdou widle aspoň propingnout? Ať zjistíme, jestli jsou aspoň vidět
Možná bych zkusil přidat do iptables:
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Za interface (eth0) samozřejmě doplnit tu svou
-
Tak tohle nepomohlo.
S pingem jsem nepochodil - adresa smb://[pc-s-widlema]/ nebyla nalezena, z čehož soudím, že to není správně napsaná adresa...
-
Takže problém nebude se sambou. Pokud nejde ani vidět, FW blokuje celkově přístup k tomuto pc.
Příkaz "smb://[pc-s-widlema]/ nebyla nalezena" nějak neznám nebo ho nezná můj příkazový řádek(jen v Krusaderu mi funguje), tak nevím, jak se to chová..zkoušel jsi tedy i přímo "ping ip.widle" a nic, je tak? Pokud ano, zkoušel bych postupně odebírat pravidla z tvého iptables, jedno po druhém a zkoušet, jestli po odebrání jednoho pravidla widle propingnu...za normálních okolností by to bylo samozřejmě na dýl, ale pokud sis FW dělal sám, tak určitě víš, která větev by to mohla mít na svědomí a do té sáhnout...odebírat všechno by nebylo uplně ono :-) A pokud používáš ufw nebo nějaký jiný fw, který sis sám nedefinoval, tak odebírat celé větve..až najdeš tu správnou, tak pak v ní najít tu správnou službu už bude hračka.
EDIT: No, když tak pročítám tvůj iptables, to by se mi prohledávat moc nechtělo :-) Ještě bych zkusil z PC, kde máš widle, propingnout svůj pc s linuxem...pokud propingneš, tak větev INPUT by měla být ok(ikdyž taky to není jisté) a zaměřil bych se na OUTPUT. Pokud nepropingneš ani z widlí svůj pc, začal bych s INPUT. Máš tam pravidla ještě před tím, než se vůbec nějaký paket dostane na vstup. Tuto celou větev bych vyřadil jako první.
Pokud nemáš nějaký GUI, kde se to dá naklikat, tak krásně to jde vyčíst odtud:
http://www.root.cz/clanky/vse-o-iptables-uvod/
Cca uprostřed je sekce "AKCE", parametr k iptables "-X" smaže celý řetězec. Ulož si nastavení svého fw a pak už jen odmazávej celé řetězce a po každé změně zkoušej ping...a to by bylo, aby to nešlo
-
No... "adresa smb://[pc-s-widlema]/ nebyla nalezena" není pochopitelně příkaz, ale výsledek příkazu "ping smb://[pc-s-widlema]/" přes síťové nástroje. V terminálu je to totéž - unknown host ... a to jak s ip., tak smb. Asi by to chtělu napsat tu adresu widlí nějak jinak, leč nejsem v tomhle sběhlý.
Používám ufw (resp. gufw). Ručně jsem v iptables nedělal nic. Dneska se k tomu už nedostanu, snad po neděli..., zatím dík.
-
Ach tak, ping se používá takhle:
ping 192.168.0.1
ping www.centrum.cz
atd....takže bez toho "smb://", za příkaz ping už jen IP(192.168.0.1) nebo doménovou adresu (www.centrum.cz). Pokud neznáš ip widlí, tak najeď do příkazového řádku ve widlích a tam napiš:
ipconfig
Sice jsi psal, žes to zkoušel jak s IP, tak s tím "smb", ale radši jsem to napsal znovu, ať si rozumíme...každopádně pokud opravdu ten pc nepůjde vidět (ip adresa na detekci musí stačit), tak bych vyřazoval ty větve...