[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: openvpn e iptables



Il giorno lun, 19/11/2007 alle 21.49 +0100, Pol Hallen ha scritto:
> Ciao a tutti :-)
> 
> dopo aver configurato correttamente openvpn, ho provato a modificare le 
> impostazioni del firewall:

A me sembra che manchi la regola per accettare le connessioni in input
della vpn. Suppongo sia una cosa del tipo:

iptables -A INPUT -i eth1 -p udp --dport xxxx -j ACCEPT

Nota che tu hai messo "-i tap0" che non fa quello che vuoi. Ma da dove
tenti di accedere alla VPN? Dall'esterno o dall'interno? Perché dici che
eth0 è il router ma non ha regole per lui...

> iptables -F
> iptables -X
> iptables -P OUTPUT ACCEPT
> iptables -P FORWARD ACCEPT
> iptables -P INPUT DROP
> iptables -A INPUT -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
> iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
> iptables -A INPUT -i tap0 -m state --state ESTABLISHED,RELATED -j ACCEPT
> iptables -A INPUT -i eth1 -p tcp --dport ssh -j ACCEPT
> iptables -A INPUT -i tap0 -p udp --dport 3246 -j ACCEPT
> iptables -A INPUT -i eth1 -p icmp -j ACCEPT
> 
> questo "dovrebbe" chiudere tutto dall'esterno e aprire ssh e la porta udp 3246 
> (che e' quella di openvpn).
> 
> I client putroppo mi danno: Destination Net Unreachable
> 
> (eth0 e' connessa al router, eth1 e' la lan, tap0 la vpn) - resettando il 
> firewall la vpn torna a funzionare :-) e' quindi un problema di firewall..

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog@debian.org
INIT.D Developer                                           fog@initd.org
 Everything will be OK at the end. If it's not OK, it's not the end.
                                                              -- Unknown

Attachment: signature.asc
Description: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio firmata digitalmente


Reply to: