1 (edytowany przez mike2060 2016-02-25 21:11:21)

Temat: VPN CC 15.05 / LuCI

Cześć, interesuje mnie skonfigurowanie VPN tak abym mógł się podłączyć przy użyciu wbudowanych w win10 klientów. O ile dobrze się orientuję te klienty obsługują PPtP. Kiedys udało mi się to zrobić na routerach cisco, ale teraz mam jedynie tl-wr1043ndv3 i na nim CC 15.05 / LuCI. Konfiguracja VPN jest tu jeszcze mniej dla mnie zrozumiała niż w Gargoylu. Czy mógłby mi ktoś pomóc? Chociaż wskazać pasujący poradnik.

PS Jeśli chcę podłączać się z zewnątrz do mojego routera tak aby widzieć komputery w domu, drukarkę i NAS to czy w dobrą stronę kombinuję?

2

Odp: VPN CC 15.05 / LuCI

http://eko.one.pl/?p=openwrt-pptpd#konf … pniejszych

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: VPN CC 15.05 / LuCI

okej. zrobiłem tak jak w tym poradniku i dalej nic. Czy w routerze powinienem widzieć jako podłączone urządzenie z adresem takim jaki ustawiłem jak w tym poradniku (192.168.1.11) ?

4

Odp: VPN CC 15.05 / LuCI

"dalej nic" co? Nie połączył się, nie zautoryzował?  A może po prostu masz modem komórkowy w tym openwrt?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: VPN CC 15.05 / LuCI

No nie moge sie podlaczyc z drugiego kompa z zewnątrz, ani koledzy nie mogą.
Generalnie konfiguracje mam taką: internet koncentrykiem do modemo-rutera UPC, w nim jest DMZ na tplinka i na tplinku wszystko ustawiam.

6

Odp: VPN CC 15.05 / LuCI

Pierwsza sprawa - zobacz liczniki na iptables na łańcuchu którym odblokowałeś port na firewallu. Jeżeli jest tam zero to  żaden pakiet nie dotarł, więc masz problem z UPC/dmz. Jeżeli coś przeszło - patrz logi.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7

Odp: VPN CC 15.05 / LuCI

iptables -L nie widzę liczników tylko references wiec może źle sprawdzam, za to w logach mam co minutę restart :

Thu Feb 25 23:06:00 2016 user.notice root: openvpn stopped, restarting
Thu Feb 25 23:07:00 2016 user.notice root: openvpn stopped, restarting

I to raczej nie jest nic dobrego.

8

Odp: VPN CC 15.05 / LuCI

pptp to nie jest openvpn, nie to patrzysz.

iptables -v -L

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9

Odp: VPN CC 15.05 / LuCI

no wiem, ale nie tykalem tego tym razem wiec nie wiem czemu sie ciagle restartuje.

Chain forwarding_rule (1 references)
pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere

same zera
na tplinku ustawiałem przekierowanie portu z konsoli i to nie pojawilo sie w GUI na stronce, tak ma byc? czy moze dla pewności dodac? tylko na jaki IP?

jak na UPC mam ustawionego tplinka na dmz to przeciez powinno puszczac wszystko na niego. Co tam jeszcze można zmienic?

10

Odp: VPN CC 15.05 / LuCI

Nie to. Port który odblokowałeś na firewallu. Nie utrudniaj sprawy tylko pokaż cały wynik polecenia iptables -v -L

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

11

Odp: VPN CC 15.05 / LuCI

Przepraszam, juz wrzucam iptables -v -L:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
30979 2645K delegate_input  all  --  any    any     anywhere             anywhere            

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
2494K 2339M delegate_forward  all  --  any    any     anywhere             anywhere            

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
17517 2198K delegate_output  all  --  any    any     anywhere             anywhere            

Chain counting_chain (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain delegate_forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         
2494K 2339M forwarding_rule  all  --  any    any     anywhere             anywhere             /* user chain for forwarding */
2486K 2338M ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
 7848  682K zone_lan_forward  all  --  br-lan any     anywhere             anywhere            
  679 35190 zone_wan_forward  all  --  eth0   any     anywhere             anywhere            
    0     0 reject     all  --  any    any     anywhere             anywhere            

Chain delegate_input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   60  4213 ACCEPT     all  --  lo     any     anywhere             anywhere            
30919 2641K input_rule  all  --  any    any     anywhere             anywhere             /* user chain for input */
 5111  651K ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
  459 22912 syn_flood  tcp  --  any    any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
22133 1676K zone_lan_input  all  --  br-lan any     anywhere             anywhere            
 3675  314K zone_wan_input  all  --  eth0   any     anywhere             anywhere            

Chain delegate_output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   60  4213 ACCEPT     all  --  any    lo      anywhere             anywhere            
17457 2194K output_rule  all  --  any    any     anywhere             anywhere             /* user chain for output */
12763 1817K ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
  410 93652 zone_lan_output  all  --  any    br-lan  anywhere             anywhere            
 4284  283K zone_wan_output  all  --  any    eth0    anywhere             anywhere            

Chain forwarding_lan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain forwarding_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            
    0     0 ACCEPT     all  --  ppp+   any     anywhere             anywhere            
    0     0 ACCEPT     all  --  any    ppp+    anywhere             anywhere            

Chain forwarding_vpn_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain forwarding_vpnpptp_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain forwarding_wan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain input_lan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain input_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain input_vpn_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain input_vpnpptp_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain input_wan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain output_lan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain output_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain output_vpn_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain output_vpnpptp_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain output_wan_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain reject (4 references)
 pkts bytes target     prot opt in     out     source               destination         
  465 23056 REJECT     tcp  --  any    any     anywhere             anywhere             reject-with tcp-reset
 3210  290K REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-port-unreachable

Chain syn_flood (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  459 22912 RETURN     tcp  --  any    any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
    0     0 DROP       all  --  any    any     anywhere             anywhere            

Chain zone_lan_dest_ACCEPT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  410 93652 ACCEPT     all  --  any    br-lan  anywhere             anywhere            

Chain zone_lan_dest_REJECT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 reject     all  --  any    br-lan  anywhere             anywhere            

Chain zone_lan_forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 7848  682K forwarding_lan_rule  all  --  any    any     anywhere             anywhere             /* user chain for forwarding */
 7848  682K zone_wan_dest_ACCEPT  all  --  any    any     anywhere             anywhere             /* forwarding lan -> wan */
    0     0 zone_vpnpptp_dest_ACCEPT  all  --  any    any     anywhere             anywhere             /* forwarding lan -> vpnpptp */
    0     0 zone_vpn_dest_ACCEPT  all  --  any    any     anywhere             anywhere             /* forwarding lan -> vpn */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port forwards */
    0     0 zone_lan_dest_REJECT  all  --  any    any     anywhere             anywhere            

Chain zone_lan_input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
22133 1676K input_lan_rule  all  --  any    any     anywhere             anywhere             /* user chain for input */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port redirections */
22133 1676K zone_lan_src_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_lan_output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  410 93652 output_lan_rule  all  --  any    any     anywhere             anywhere             /* user chain for output */
  410 93652 zone_lan_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_lan_src_ACCEPT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
22133 1676K ACCEPT     all  --  br-lan any     anywhere             anywhere            

Chain zone_vpn_dest_ACCEPT (3 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain zone_vpn_forward (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 forwarding_vpn_rule  all  --  any    any     anywhere             anywhere             /* user chain for forwarding */
    0     0 zone_wan_dest_ACCEPT  all  --  any    any     anywhere             anywhere             /* forwarding vpn -> wan */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port forwards */
    0     0 zone_vpn_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpn_input (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 input_vpn_rule  all  --  any    any     anywhere             anywhere             /* user chain for input */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port redirections */
    0     0 zone_vpn_src_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpn_output (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 output_vpn_rule  all  --  any    any     anywhere             anywhere             /* user chain for output */
    0     0 zone_vpn_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpn_src_ACCEPT (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain zone_vpnpptp_dest_ACCEPT (3 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain zone_vpnpptp_forward (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 forwarding_vpnpptp_rule  all  --  any    any     anywhere             anywhere             /* user chain for forwarding */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port forwards */
    0     0 zone_vpnpptp_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpnpptp_input (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 input_vpnpptp_rule  all  --  any    any     anywhere             anywhere             /* user chain for input */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port redirections */
    0     0 zone_vpnpptp_src_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpnpptp_output (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 output_vpnpptp_rule  all  --  any    any     anywhere             anywhere             /* user chain for output */
    0     0 zone_vpnpptp_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_vpnpptp_src_ACCEPT (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain zone_wan_dest_ACCEPT (3 references)
 pkts bytes target     prot opt in     out     source               destination         
12132  965K ACCEPT     all  --  any    eth0    anywhere             anywhere            

Chain zone_wan_dest_REJECT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 reject     all  --  any    eth0    anywhere             anywhere            

Chain zone_wan_forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  679 35190 forwarding_wan_rule  all  --  any    any     anywhere             anywhere             /* user chain for forwarding */
  679 35190 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port forwards */
    0     0 zone_wan_dest_REJECT  all  --  any    any     anywhere             anywhere            

Chain zone_wan_input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 3675  314K input_wan_rule  all  --  any    any     anywhere             anywhere             /* user chain for input */
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere             udp dpt:bootpc /* Allow-DHCP-Renew */
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp echo-request /* Allow-Ping */
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate DNAT /* Accept port redirections */
 3675  314K zone_wan_src_REJECT  all  --  any    any     anywhere             anywhere            

Chain zone_wan_output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 4284  283K output_wan_rule  all  --  any    any     anywhere             anywhere             /* user chain for output */
 4284  283K zone_wan_dest_ACCEPT  all  --  any    any     anywhere             anywhere            

Chain zone_wan_src_REJECT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 3675  314K reject     all  --  eth0   any     anywhere             anywhere            

12

Odp: VPN CC 15.05 / LuCI

Jeżeli zrobiłeś tak jak w poradniku to gdzie masz port 1723 otworzony na firewallu?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

13

Odp: VPN CC 15.05 / LuCI

okej. znalazłem błąd: w /etc/config/firewall miałem literówkę "proto txp" a nie "proto tcp".
Wielkie dzięki za pomoc.

14

Odp: VPN CC 15.05 / LuCI

jeszcze mam takie pytanie, podłączając się np z uczelni do mojej sieci domowej przez ten VPN nie widzę komputerów i urządzeń w domu. Co powinienem ustawic zeby je było widac?

15

Odp: VPN CC 15.05 / LuCI

Zapewne firewall. Uczynić ten vpn następnym "wanem", czyli zrobić na nim maskaradę w firewallu żeby działał routing vpn<>lan.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

16 (edytowany przez mike2060 2016-03-27 01:15:45)

Odp: VPN CC 15.05 / LuCI

znalazłem takie coś w firewall:

#tego nie ma
config include
    option type 'script'
    option path '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'
    option family 'IPv4'
    option reload '1'

#tego nie ma
config include 'miniupnpd'
    option type 'script'
    option path '/usr/share/miniupnpd/firewall.include'
    option family 'IPv4'
    option reload '1'

#tego nie ma
config include 'openvpn_include_file'
    option path '/etc/openvpn.firewall'
    option reload '1'

#tego nie ma
config remote_accept 'ra_openvpn'
    option zone 'wan'
    option local_port '1194'
    option remote_port '1194'
    option proto 'udp'

#tego nie ma
config remote_accept 'ra_22_22'
    option local_port '22'
    option remote_port '22'
    option proto 'tcp'
    option zone 'wan'

Mogę to wywalic?
Próbowałem zastosować to co powiedziałeś, ale wywaliło mi sie całe połączenie z netem. Mógłbyś sprecyzować co i gdzie mam zmienic?

17

Odp: VPN CC 15.05 / LuCI

https://wiki.openwrt.org/doc/howto/vpn. … p#firewall

Ale... z tego co widzę używasz gargoyle. Więc ostożnie z tym, bo gui może wywalić ci wpisy które zrobiłeś jeżeli coś w nim zaczniesz mieszać.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

18

Odp: VPN CC 15.05 / LuCI

Gargoyle miałem wgrany wczesniej, nie wiem w sumie czemu się to tu pojawiło, usunąłem i działa jak działało.
Dalej nie widze innych kompów jak łącze się przez VPN

Lan>wan, vpn, vpnpptp mam na accept we wszystkich polach

Próbowałem dac lan>vpn ale urywa mi dostęp do internetu, cokolwiek dodam a potem usunę to mi ucina dostęp do neta i nie wiem nawet czemu.