Tente isto:
modprobe ip_nat_pptp
Eu também não consegui me conectar da minha LAN, embora todas as regras estivessem muito relaxadas.
Implementei recentemente um firewall / gateway Raspberry Pi na minha rede executando o iptables.
Desde a implementação, não consigo me conectar a um servidor PPTP baseado em Windows no meu trabalho.
Eu pensei que eu tinha uma regra de "permitir tudo o que está saindo", mas eu acho que não. Todo o script iptables listado abaixo.
PATH=/usr/sbin:/sbin:/bin:/usr/bin
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth1 -o eth1 -j REJECT
echo 1 > /proc/sys/net/ipv4/ip_forward
Aqui estão os meus resultados de iptables -L -vn; iptables -t nat -L -vn:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
21 1572 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
9 656 ACCEPT all -- eth1 eth0 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth1 eth0 0.0.0.0/0 0.0.0.0/0 tcp dpt:1723 state NEW,ESTABLISHED
0 0 ACCEPT tcp -- eth0 eth1 0.0.0.0/0 0.0.0.0/0 tcp spt:1723 state RELATED,ESTABLISHED
0 0 ACCEPT 47 -- eth1 eth1 0.0.0.0/0 0.0.0.0/0 state NEW,ESTABLISHED
0 0 ACCEPT 47 -- eth0 eth1 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
9 498 ACCEPT all -- eth0 eth1 0.0.0.0/0 0.0.0.0/0
0 0 REJECT all -- eth1 eth1 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
11 1212 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW,ESTABLISHED
Chain PREROUTING (policy ACCEPT 1 packets, 64 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- eth1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1723 to:192.168.1.51
0 0 DNAT 47 -- eth1 * 0.0.0.0/0 0.0.0.0/0 to:192.168.1.51
Chain INPUT (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
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
1 64 MASQUERADE all -- * eth1 0.0.0.0/0 0.0.0.0/0
Tente isto:
modprobe ip_nat_pptp
Eu também não consegui me conectar da minha LAN, embora todas as regras estivessem muito relaxadas.