Newsgroup: it.comp.os.linux.iniziare
Titolo: Problem Firewall su ubuntu

Buongiorno a tutti,
sono riuscito ad installare la mia stampante multifunzione in rete ed
usarla su linux sia come scanner che come stampante
 
se eseguo il commando
 
scanimage -L
 
ottengo:
 
device `epkowa:net:192.168.0.8' is a Epson XP-950 Series flatbed scanner
 
 
ho installato gufw e ho attivato il firewall ufw, ma vedo che il comando
che ho usato sopra non funziona più, non mi trova lo scanner.
 
riesco a pingarlo e a vederlo dal browser, anche a stampare, ma lo
scanner proprio no
 
ho cercato su internet e ho provato ad inserire le seguenti regole
 
sudo ufw allow saned
sudo ufw allow from 192.168.0.8
ufw allow 6566
ufw allow 6566/tcp
ufw allow 6566/ucp
sudo ufw allow from 192.168.0.8 to any port 6566
 
saned gira su porta 6566
 
le regole le vedo da gufw e ho impostato gufw come rete domestica e
traffico in entrata ed uscita consentito
 
riattivando il firewall non vedo lo scanner
disattivandolo si
 
qualche idea?
 
grazie
 
-- 
Ciao!
Nobuteru
Jabber ID 
nobu...@jabber.org
 
Download free Jabber client from 
www.jabber.org
 

 disattivandolo si
 
Prova a vedere se seguendo le indicazioni di questa guida risolvi:
 
http://tech.ivkin.net/wiki/Linux_and_Unix_Networking_How_To#How_to_configure_UFW_to_allow_SANED_scanner_connections
 
 


ciao
grazie, ho provato il link ad aggiungere le regole
 
sudo ufw allow proto tcp from 
192.168.1.0/24
 to any port 6566
sudo ufw allow proto tcp from 
192.168.1.0/24
 to any port 40000:40100
 
ed editare il file
 
sudo vi /etc/sane.d/saned.conf
data_portrange = 40000 - 40100
 
come indicato anche nel file stesso in caso di firewall
 
ho anche provato ad aggiungere a /etc/default/ufw
 
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_netbios_ns
nf_conntrack_sane"
 
 
ma niente... non me lo vede a firewall attivo, riavviato pc riprovato ma
niente, ho anche aperto un bug da launchpad
 
questo è lo status di ufw se può servire
 
ufw status
Stato: attivo
 
A                          Azione      Da
-                          ------      --
6566/tcp                   ALLOW       
192.168.0.0/24
 
40000:40100/tcp            ALLOW       
192.168.0.0/24
 
6566/tcp                   ALLOW       Anywhere
Anywhere                   ALLOW       192.168.0.8
6566                       ALLOW       Anywhere
6566/udp                   ALLOW       Anywhere
6566                       ALLOW       
192.168.0.0/24
 
6566/udp                   ALLOW       
192.168.0.0/24
 
40000:40100/udp            ALLOW       
192.168.0.0/24
 
40000:40100/udp            ALLOW       192.168.0.8
6566/udp                   ALLOW       192.168.0.8
6566/tcp                   ALLOW       192.168.0.8
40000:40100/tcp            ALLOW       192.168.0.8
Anywhere                   ALLOW       192.168.0.255
Anywhere                   ALLOW       
192.168.0.255/udp
 
Anywhere                   ALLOW       
192.168.0.255/tcp
 
6566/tcp (v6)              ALLOW       Anywhere (v6)
6566 (v6)                  ALLOW       Anywhere (v6)
6566/udp (v6)              ALLOW       Anywhere (v6)
 
 
 
grazie,
ciao


 6566/udp (v6)              ALLOW       Anywhere (v6)
 
  Solo porte permesse e nulla di bloccato?  Non ci credo.
Vedi con iptables -vL quali sono realmente le regole per la catena filter.
 
 
  Ciao,
 
 
 
-- 
Alessandro Selli 
http://alessandro.route-add.net
 
AVVERTENZA: i messaggi inviati a "trappola" non mi arriveranno.
WARNING: messages sent to "trappola" will never reach me.
 

   Ciao,
ciao
non sono esperto di firewall... ho provato ufw e gufw (front end
grafico), vedo che rispetto anni fa qualcosa si è mosso, almeno per
utenti non esperti come me.
 
potrei disinstallarli, non vedo l'utilità, non ho un pc su cui girano
server (ftp,web e etc etc) a cui devo accedere dall'esterno, la mia è
solo curiosità
 
cmq iptables per me è greco :-), non ho mai voluto imparare
 
ecco l'output :
 
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source
destination
 
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source
destination
 
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source
destination
 
 
grazie


>
perdonami ho sbagliato dovevo eseguire il comando con ufw attivo
 
ecco l'output :
 
sudo iptables -vL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source
destination
   59 10000 ufw-before-logging-input  all  --  any    any     anywhere
           anywhere
   59 10000 ufw-before-input  all  --  any    any     anywhere
   anywhere
   24  8174 ufw-after-input  all  --  any    any     anywhere
  anywhere
    3   242 ufw-after-logging-input  all  --  any    any     anywhere
          anywhere
    3   242 ufw-reject-input  all  --  any    any     anywhere
   anywhere
    3   242 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
    0     0 ufw-track-forward  all  --  any    any     anywhere
    anywhere
 
Chain OUTPUT (policy ACCEPT 2 packets, 104 bytes)
 pkts bytes target     prot opt in     out     source
destination
   38  2443 ufw-before-logging-output  all  --  any    any     anywhere
            anywhere
   38  2443 ufw-before-output  all  --  any    any     anywhere
    anywhere
    7   817 ufw-after-output  all  --  any    any     anywhere
   anywhere
    7   817 ufw-after-logging-output  all  --  any    any     anywhere
           anywhere
    7   817 ufw-reject-output  all  --  any    any     anywhere
    anywhere
    7   817 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 ufw-skip-to-policy-input  udp  --  any    any     anywhere
           anywhere             udp dpt:netbios-ns
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere
           anywhere             udp dpt:netbios-dgm
    0     0 ufw-skip-to-policy-input  tcp  --  any    any     anywhere
           anywhere             tcp dpt:netbios-ssn
    0     0 ufw-skip-to-policy-input  tcp  --  any    any     anywhere
           anywhere             tcp dpt:microsoft-ds
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere
           anywhere             udp dpt:bootps
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere
           anywhere             udp dpt:bootpc
   21  7932 ufw-skip-to-policy-input  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
    0     0 LOG        all  --  any    any     anywhere
anywhere             limit: avg 3/min burst 10 LOG level warning prefix
"[UFW BLOCK] "
 
Chain ufw-after-logging-input (1 references)
 pkts bytes target     prot opt in     out     source
destination
    3   242 LOG        all  --  any    any     anywhere
anywhere             limit: avg 3/min burst 10 LOG level warning prefix
"[UFW ALLOW] "
 
Chain ufw-after-logging-output (1 references)
 pkts bytes target     prot opt in     out     source
destination
    7   817 LOG        all  --  any    any     anywhere
anywhere             limit: avg 3/min burst 10 LOG level warning prefix
"[UFW ALLOW] "
 
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 ACCEPT     all  --  any    any     anywhere
anywhere             ctstate RELATED,ESTABLISHED
    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 ufw-user-forward  all  --  any    any     anywhere
   anywhere
 
Chain ufw-before-input (1 references)
 pkts bytes target     prot opt in     out     source
destination
   28  1470 ACCEPT     all  --  lo     any     anywhere
anywhere
    5   264 ACCEPT     all  --  any    any     anywhere
anywhere             ctstate RELATED,ESTABLISHED
    2    92 ufw-logging-deny  all  --  any    any     anywhere
   anywhere             ctstate INVALID
    2    92 DROP       all  --  any    any     anywhere
anywhere             ctstate 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
   24  8174 ufw-not-local  all  --  any    any     anywhere
anywhere
    0     0 ACCEPT     udp  --  any    any     anywhere
224.0.0.251          udp dpt:mdns
    0     0 ACCEPT     udp  --  any    any     anywhere
239.255.255.250      udp dpt:1900
   24  8174 ufw-user-input  all  --  any    any     anywhere
 anywhere
 
Chain ufw-before-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source
destination
    0     0 LOG        all  --  any    any     anywhere
anywhere             ctstate NEW limit: avg 3/min burst 10 LOG level
warning prefix "[UFW AUDIT] "
 
Chain ufw-before-logging-input (1 references)
 pkts bytes target     prot opt in     out     source
destination
   10  2498 LOG        all  --  any    any     anywhere
anywhere             ctstate NEW limit: avg 3/min burst 10 LOG level
warning prefix "[UFW AUDIT] "
 
Chain ufw-before-logging-output (1 references)
 pkts bytes target     prot opt in     out     source
destination
    6   766 LOG        all  --  any    any     anywhere
anywhere             ctstate NEW limit: avg 3/min burst 10 LOG level
warning prefix "[UFW AUDIT] "
 
Chain ufw-before-output (1 references)
 pkts bytes target     prot opt in     out     source
destination
   28  1470 ACCEPT     all  --  any    lo      anywhere
anywhere
    3   156 ACCEPT     all  --  any    any     anywhere
anywhere             ctstate RELATED,ESTABLISHED
    7   817 ufw-user-output  all  --  any    any     anywhere
  anywhere
 
Chain ufw-logging-allow (0 references)
 pkts bytes target     prot opt in     out     source
destination
    0     0 LOG        all  --  any    any     anywhere
anywhere             limit: avg 3/min burst 10 LOG level warning prefix
"[UFW ALLOW] "
 
Chain ufw-logging-deny (2 references)
 pkts bytes target     prot opt in     out     source
destination
    2    92 LOG        all  --  any    any     anywhere
anywhere             ctstate INVALID limit: avg 3/min burst 10 LOG level
warning prefix "[UFW AUDIT INVALID] "
    2    92 LOG        all  --  any    any     anywhere
anywhere             limit: avg 3/min burst 10 LOG level warning prefix
"[UFW BLOCK] "
 
Chain ufw-not-local (1 references)
 pkts bytes target     prot opt in     out     source
destination
    3   242 RETURN     all  --  any    any     anywhere
anywhere             ADDRTYPE match dst-type LOCAL
    0     0 RETURN     all  --  any    any     anywhere
anywhere             ADDRTYPE match dst-type MULTICAST
   21  7932 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-skip-to-policy-forward (0 references)
 pkts bytes target     prot opt in     out     source
destination
    0     0 DROP       all  --  any    any     anywhere
anywhere
 
Chain ufw-skip-to-policy-input (7 references)
 pkts bytes target     prot opt in     out     source
destination
   21  7932 ACCEPT     all  --  any    any     anywhere
anywhere
 
Chain ufw-skip-to-policy-output (0 references)
 pkts bytes target     prot opt in     out     source
destination
    0     0 ACCEPT     all  --  any    any     anywhere
anywhere
 
Chain ufw-track-forward (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
    3   242 ACCEPT     tcp  --  any    any     anywhere
anywhere             ctstate NEW
    0     0 ACCEPT     udp  --  any    any     anywhere
anywhere             ctstate NEW
 
Chain ufw-track-output (1 references)
 pkts bytes target     prot opt in     out     source
destination
    5   713 ACCEPT     tcp  --  any    any     anywhere
anywhere             ctstate NEW
    0     0 ACCEPT     udp  --  any    any     anywhere
anywhere             ctstate 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
    0     0 ACCEPT     tcp  --  any    any     
192.168.0.0/24
 
anywhere             tcp dpt:sane-port
    0     0 ACCEPT     tcp  --  any    any     
192.168.0.0/24
 
anywhere             multiport dports 40000:40100
    0     0 ACCEPT     tcp  --  any    any     anywhere
anywhere             tcp dpt:sane-port
    0     0 ACCEPT     all  --  any    any     192.168.0.8
anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere
anywhere             tcp dpt:sane-port
    0     0 ACCEPT     udp  --  any    any     anywhere
anywhere             udp dpt:6566
    0     0 ACCEPT     udp  --  any    any     anywhere
anywhere             udp dpt:6566
    0     0 ACCEPT     tcp  --  any    any     
192.168.0.0/24
 
anywhere             tcp dpt:sane-port
    0     0 ACCEPT     udp  --  any    any     
192.168.0.0/24
 
anywhere             udp dpt:6566
    0     0 ACCEPT     udp  --  any    any     
192.168.0.0/24
 
anywhere             udp dpt:6566
    0     0 ACCEPT     udp  --  any    any     
192.168.0.0/24
 
anywhere             multiport dports 40000:40100
    0     0 ACCEPT     udp  --  any    any     192.168.0.8
anywhere             multiport dports 40000:40100
    0     0 ACCEPT     udp  --  any    any     192.168.0.8
anywhere             udp dpt:6566
    0     0 ACCEPT     tcp  --  any    any     192.168.0.8
anywhere             tcp dpt:sane-port
    0     0 ACCEPT     tcp  --  any    any     192.168.0.8
anywhere             multiport dports 40000:40100
    0     0 ACCEPT     all  --  any    any     192.168.0.255
anywhere
    0     0 ACCEPT     udp  --  any    any     192.168.0.255
anywhere
    0     0 ACCEPT     tcp  --  any    any     192.168.0.255
anywhere
 
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
 
 
 


   anywhere
 
  Dopo una dozzina di righe su 200 m'è passata la voglia (stasera non ho
tempo per attività extra).  E meno male che questo sarebbe
l'Uncomplicated FireWall... ma che vadano a farsi tosare.


 
eh guarda, tutte quelle regole non le ho create io e con iptables non
saprei dove iniziare e perdonami se non sbaglio ma credo che sia stato
ufw... su ufw ho messo un pò di regole io in più perchè cercando su
google consigliavano di mettere regole su porte tcp e udp (netmask e etc
etc) e etc etc, io le ho messe lo stesso senza  avere risultati
 
male che vada tolgo ufw o lo lascio disattivato, cmq vedo che anche
dalla home di ufw non mi rispondono...
 
sono riuscito a risolvere online il problema di saned e systemd... saned
sotto ubuntu mi girava mascherato per problemi con systemd e lo scanner
non me lo rilevava,leggevo sui wiki di ubuntu che al momento  non c'è
soluzione (soluzione poi trovata online da parte di un tedesco, link che
ho poi girato a loro)...
 
boh.. forse è la volta buona che mi impari finalmente iptables..
 
 
 
grazie lo stesso dell'aiuto
