Temat: OpenWRT BB i serwer PPTP

Witam posiadam TP-LINK TL-WR740N v 4.23 z OpenWRT BB by obsy z LUci
Chcę postawić na nim serwer PPTP
Na routerze mam internet przez tryb AP + AP Client
Łączę się z moją główną siecią  po wifi ( Neostrada Router Sagemcom Fast 2704 ) i rozsyłam dalej po innym ssid i haśle
Adres Sagemcoma to 192.168.1.1
Adres TP-LINKA to 192.168.3.1
Adres jaki TP-LINK dostaje od Sagemcoma to 192.168.1.5
Na Sagemie przekierowany port 1723 dla 192.168.1.5
http://obrazki.elektroda.pl/2360404300_1430572709_thumb.jpg
Jak skonfigurować ten serwer PPTP

Plik /etc/pptpd.conf wygląda tak :

#debug
option /etc/ppp/options.pptpd
speed 115200
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
localip 192.168.3.1
remoteip 192.168.3.81-99

Plik /etc/ppp/options.pptpd tak :

#debug
#logfile /tmp/pptp-server.log
auth
name "pptp-server"
lcp-echo-failure 3
lcp-echo-interval 60
default-asyncmap
mtu 1482
mru 1482
nobsdcomp
nodeflate
proxyarp
#nomppc
mppe required,no40,no56,stateless
require-mschap-v2
refuse-chap
refuse-mschap
refuse-eap
refuse-pap
ms-dns 192.168.3.1
#plugin radius.so
#radius-config-file /etc/radius.conf

A plik /etc/ppp/chap-secrets tak :

Norbert * mojehaslo *

Plik /etc/config/firewall tak :

config defaults
    option syn_flood '1'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'

config zone
    option name 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'ACCEPT'
    option network 'lan'

config zone
    option name 'wan'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'
    option network 'wan wan6 wwan'

config forwarding
    option src 'lan'
    option dest 'wan'

config rule
    option name 'Allow-DHCP-Renew'
    option src 'wan'
    option proto 'udp'
    option dest_port '68'
    option target 'ACCEPT'
    option family 'ipv4'

config rule
    option name 'Allow-Ping'
    option src 'wan'
    option proto 'icmp'
    option icmp_type 'echo-request'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fe80::/10'
    option src_port '547'
    option dest_ip 'fe80::/10'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    list icmp_type 'router-solicitation'
    list icmp_type 'neighbour-solicitation'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'PPTP'
    option src 'wan'
    option dest_port '1723'
    option proto 'tcp'
    option target 'ACCEPT'

config include
    option path '/etc/firewall.user'

config redirect
    option target 'DNAT'
    option src 'wan'
    option dest 'lan'
    option proto 'tcp udp'
    option src_dport '1723'
    option dest_ip '192.168.3.1'
    option dest_port '1723'
    option name 'PPTP'

config redirect
    option enabled '1'
    option target 'SNAT'
    option src 'lan'
    option dest 'wan'
    option src_dip '192.168.3.1'
    option src_dport '1723'
    option name 'PPTP'
    option proto 'tcp'
    option src_ip '192.168.3.1'
    option src_port '1723'
    option dest_ip '192.168.3.1'
    option dest_port '1723'

Jak to skonfigurować aby serwer działał ?

2

Odp: OpenWRT BB i serwer PPTP

Ten redirect do niczego ci nie jest potrzebny. Tylko odtworzenie portu 1723 i nic więcej.

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

3

Odp: OpenWRT BB i serwer PPTP

Witam

Czy z interfejsu GUI LuCi da się uruchomić serwer VPN PPTP ?
Obecnie mam zainstalowany DD-WRT któy posiada w GUI taką możliwośc.

Zyxel EX5601-T1

4

Odp: OpenWRT BB i serwer PPTP

Luci nie ma takiej strony.  Ręcznie.

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

5 (edytowany przez mgrlukasz 2015-05-03 16:22:44)

Odp: OpenWRT BB i serwer PPTP

Czy w garygoyle jest przewidziana opcja Serwer VPN PPTP ?w  w którejś nowsze wersji?

Zyxel EX5601-T1

6

Odp: OpenWRT BB i serwer PPTP

Nic mi o tym nie wiadomo.

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

7

Odp: OpenWRT BB i serwer PPTP

Serwer VPN PPTP skonfiguruj wg http://wiki.openwrt.org/doc/howto/vpn.server.pptpd . U mnie dziala z tym że nie przyznaje konkretnych adresów IP klientom (pierwszy z puli dla VPN). Nie ma też mozliwosci polaczenia z innym urzadzeniem niz router- pewnie trzeba cos dopisac do firewalla.

8

Odp: OpenWRT BB i serwer PPTP

Serwer już działa ale tylko z tej sieci co mam przez ten router
Na sagemie już nie działa
Jak zrobić aby działało i publicznie i na sagemie ?
Port 1723 przekierowany w tp-linku dla 192.168.3.1 i w sagemie dla 192.168.1.5

9

Odp: OpenWRT BB i serwer PPTP

W tplinku nie robisz przekierowania tylko otworzenie portu na wanie.

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

10

Odp: OpenWRT BB i serwer PPTP

Jak to zrobić ?

11

Odp: OpenWRT BB i serwer PPTP

http://eko.one.pl/?p=openwrt-konfigurac … estronywan

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

12

Odp: OpenWRT BB i serwer PPTP

Okej już wszystko działa
Ten serwer mam postawiony u znajomego a w domu mam Plus Power LTE i Router TP-LINK TL-MR3420 v1 z OpenWRT BB by obsy
Jak przekierować cały ruch z tego tp-linka TL-MR3420 na ten serwer ?

13

Odp: OpenWRT BB i serwer PPTP

Podłącz się klientem pptp to cały ruch będzie szedł przez niego.

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

14

Odp: OpenWRT BB i serwer PPTP

Jak to zrobić na OpenWRT BB ?
Jest do tego jakieś gui w LUci (Tak jak to było w gargoyle) ?

15

Odp: OpenWRT BB i serwer PPTP

Tak, jest wybór pptp w luci przy konfiguracji wanu.

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

16

Odp: OpenWRT BB i serwer PPTP

Dodałem nowy interfejs i jest okej mogę dostać się na router na którym jest ten serwer i na sagema

http://obrazki.elektroda.pl/4520891700_1430754312_thumb.jpg

Jak teraz zrobić abym mógł dostać się do mojego dysku udostępnianego przez sambę , kamerki , transmission , ssh , luci , (mam to na routerze tp-link mr3420) ?

17

Odp: OpenWRT BB i serwer PPTP

Ustaw tak sobie system aby pytania do danego hosta szły przez tunel. Pewnie musisz zestawić sobie z komputera tunel do serwera i odpowiednio ustawić routing na nim i na swoim komputerze zeby było wiadomo gdzie kierować danych ruch.

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

18

Odp: OpenWRT BB i serwer PPTP

Czyli jak mam to zrobić ? (bo kompletnie tego nie kumam wink )

19

Odp: OpenWRT BB i serwer PPTP

Czyli kompletnie nikt ci tego nie napisze jak nie przedstawisz konfiguracji i serwera i swojego komputera. Adresacja/routing/firewall wszystko co potrzebne.

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

20

Odp: OpenWRT BB i serwer PPTP

Co mam podać ?
Konfigurację firewalla z mr3420 czy z serwera PPTP ?
Konfigurację serwera ?
Zakładkę routing z mr3420 czy z serwera PPTP ?
Chcę łączyć się przez internet 3G do tego serwera (postawiony na wr740n) i widzieć dysk kamerkę transmission shh luci z t-mr3420

21

Odp: OpenWRT BB i serwer PPTP

I z tego i z tego.

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

22 (edytowany przez Norbix1999 2015-05-04 17:57:29)

Odp: OpenWRT BB i serwer PPTP

Polecenie route -n z serwera (TL-WR740N) :

root@OpenWrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.3.100   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

Z mr3420 :

root@OpenWrt:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.3.14    0.0.0.0         UG    0      0        0 pptp-PPTP
83.27.116.145   192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.3.14    0.0.0.0         255.255.255.255 UH    0      0        0 pptp-PPTP

Uci show firewall z wr740n :

root@OpenWrt:~# uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood=1
firewall.@defaults[0].input=ACCEPT
firewall.@defaults[0].output=ACCEPT
firewall.@defaults[0].forward=ACCEPT
firewall.@include[0]=include
firewall.@include[0].path=/etc/firewall.user
firewall.@zone[0]=zone
firewall.@zone[0].input=ACCEPT
firewall.@zone[0].forward=ACCEPT
firewall.@zone[0].output=ACCEPT
firewall.@zone[0].name=lan
firewall.@zone[0].network=lan
firewall.@zone[1]=zone
firewall.@zone[1].output=ACCEPT
firewall.@zone[1].name=wan
firewall.@zone[1].network=wan wan6
firewall.@zone[1].input=REJECT
firewall.@zone[1].forward=REJECT
firewall.@zone[1].masq=1
firewall.@zone[1].mtu_fix=1
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].dest=wan
firewall.@forwarding[0].src=lan
firewall.@rule[0]=rule
firewall.@rule[0].name=PPTP
firewall.@rule[0].src=wan
firewall.@rule[0].dest=lan
firewall.@rule[0].proto=tcp
firewall.@rule[0].src_dport=1723
firewall.@rule[0].dest_port=1723
firewall.@rule[1]=rule
firewall.@rule[1].name=PPTP0
firewall.@rule[1].src=wan
firewall.@rule[1].target=ACCEPT
firewall.@rule[1].proto=tcp
firewall.@rule[1].dest_port=1723
firewall.@rule[2]=rule
firewall.@rule[2].name=PPTP1
firewall.@rule[2].src=wan
firewall.@rule[2].target=ACCEPT
firewall.@rule[2].proto=tcp
firewall.@rule[2].dest_port=47
firewall.@rule[3]=rule
firewall.@rule[3].name=PPTP0
firewall.@rule[3].src=wan
firewall.@rule[3].target=ACCEPT
firewall.@rule[3].proto=tcp
firewall.@rule[3].dest_port=1723
firewall.@rule[4]=rule
firewall.@rule[4].name=PPTP1
firewall.@rule[4].src=wan
firewall.@rule[4].target=ACCEPT
firewall.@rule[4].proto=tcp
firewall.@rule[4].dest_port=47
firewall.@redirect[0]=redirect
firewall.@redirect[0].target=DNAT
firewall.@redirect[0].src=wan
firewall.@redirect[0].dest=lan
firewall.@redirect[0].proto=tcp udp
firewall.@redirect[0].src_dport=1723
firewall.@redirect[0].dest_ip=192.168.3.1
firewall.@redirect[0].dest_port=1723
firewall.@redirect[0].name=PPTP
firewall.@redirect[1]=redirect
firewall.@redirect[1].target=DNAT
firewall.@redirect[1].src=wan
firewall.@redirect[1].dest=lan
firewall.@redirect[1].proto=tcp udp
firewall.@redirect[1].src_dport=47
firewall.@redirect[1].dest_ip=192.168.3.1
firewall.@redirect[1].dest_port=47
firewall.@redirect[1].name=PPTPS
firewall.@redirect[2]=redirect
firewall.@redirect[2].target=DNAT
firewall.@redirect[2].src=wan
firewall.@redirect[2].dest=lan
firewall.@redirect[2].proto=tcp udp
firewall.@redirect[2].src_dport=1723
firewall.@redirect[2].dest_ip=192.168.1.1
firewall.@redirect[2].dest_port=1723
firewall.@redirect[2].name=PPTPSS
firewall.@rule[5]=rule
firewall.@rule[5].name=PPTP
firewall.@rule[5].src=wan
firewall.@rule[5].target=ACCEPT
firewall.@rule[5].proto=tcp
firewall.@rule[5].dest_port=1723
firewall.@rule[6]=rule
firewall.@rule[6].target=ACCEPT
firewall.@rule[6].src=wan
firewall.@rule[6].proto=tcp udp
firewall.@rule[6].dest_port=445
firewall.@rule[6].name=Samba
firewall.@redirect[3]=redirect
firewall.@redirect[3].target=DNAT
firewall.@redirect[3].src=wan
firewall.@redirect[3].dest=lan
firewall.@redirect[3].proto=tcp udp
firewall.@redirect[3].src_dport=445
firewall.@redirect[3].dest_ip=192.168.3.1
firewall.@redirect[3].dest_port=445
firewall.@redirect[3].name=Samba

uci show firewall z mr3420 :

root@OpenWrt:~# uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood=1
firewall.@defaults[0].input=ACCEPT
firewall.@defaults[0].output=ACCEPT
firewall.@defaults[0].forward=REJECT
firewall.@zone[0]=zone
firewall.@zone[0].name=lan
firewall.@zone[0].input=ACCEPT
firewall.@zone[0].output=ACCEPT
firewall.@zone[0].forward=ACCEPT
firewall.@zone[0].network=lan
firewall.@zone[1]=zone
firewall.@zone[1].name=wan
firewall.@zone[1].input=REJECT
firewall.@zone[1].output=ACCEPT
firewall.@zone[1].forward=REJECT
firewall.@zone[1].masq=1
firewall.@zone[1].mtu_fix=1
firewall.@zone[1].network=wan wan6 wwan PPTP
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src=lan
firewall.@forwarding[0].dest=wan
firewall.@rule[0]=rule
firewall.@rule[0].name=Allow-DHCP-Renew
firewall.@rule[0].src=wan
firewall.@rule[0].proto=udp
firewall.@rule[0].dest_port=68
firewall.@rule[0].target=ACCEPT
firewall.@rule[0].family=ipv4
firewall.@rule[1]=rule
firewall.@rule[1].name=Allow-Ping
firewall.@rule[1].src=wan
firewall.@rule[1].proto=icmp
firewall.@rule[1].icmp_type=echo-request
firewall.@rule[1].family=ipv4
firewall.@rule[1].target=ACCEPT
firewall.@rule[2]=rule
firewall.@rule[2].name=Allow-DHCPv6
firewall.@rule[2].src=wan
firewall.@rule[2].proto=udp
firewall.@rule[2].src_ip=fe80::/10
firewall.@rule[2].src_port=547
firewall.@rule[2].dest_ip=fe80::/10
firewall.@rule[2].dest_port=546
firewall.@rule[2].family=ipv6
firewall.@rule[2].target=ACCEPT
firewall.@rule[3]=rule
firewall.@rule[3].name=Allow-ICMPv6-Input
firewall.@rule[3].src=wan
firewall.@rule[3].proto=icmp
firewall.@rule[3].icmp_type=echo-request echo-reply destination-unreachable packet-too-big time-exceeded bad-header unknown-header-type router-solicitation neighbour-solicitation router-advertisement neighbour-advertisement
firewall.@rule[3].limit=1000/sec
firewall.@rule[3].family=ipv6
firewall.@rule[3].target=ACCEPT
firewall.@rule[4]=rule
firewall.@rule[4].name=Allow-ICMPv6-Forward
firewall.@rule[4].src=wan
firewall.@rule[4].dest=*
firewall.@rule[4].proto=icmp
firewall.@rule[4].icmp_type=echo-request echo-reply destination-unreachable packet-too-big time-exceeded bad-header unknown-header-type
firewall.@rule[4].limit=1000/sec
firewall.@rule[4].family=ipv6
firewall.@rule[4].target=ACCEPT
firewall.@include[0]=include
firewall.@include[0].path=/etc/firewall.user
firewall.@rule[5]=rule
firewall.@rule[5]._name=transmission
firewall.@rule[5].src=wan
firewall.@rule[5].target=ACCEPT
firewall.@rule[5].proto=tcp
firewall.@rule[5].dest_port=51413
firewall.@rule[6]=rule
firewall.@rule[6]._name=transmission_wan
firewall.@rule[6].src=wan
firewall.@rule[6].target=ACCEPT
firewall.@rule[6].proto=tcp
firewall.@rule[6].dest_port=9091
firewall.miniupnpd=include
firewall.miniupnpd.type=script
firewall.miniupnpd.path=/usr/share/miniupnpd/firewall.include
firewall.miniupnpd.family=any
firewall.miniupnpd.reload=1
firewall.@redirect[0]=redirect
firewall.@redirect[0].target=DNAT
firewall.@redirect[0].src=wan
firewall.@redirect[0].dest=lan
firewall.@redirect[0].proto=tcp
firewall.@redirect[0].src_dport=22
firewall.@redirect[0].dest_ip=192.168.2.1
firewall.@redirect[0].dest_port=22
firewall.@redirect[0].name=SHH
firewall.@rule[7]=rule
firewall.@rule[7].target=ACCEPT
firewall.@rule[7].src=wan
firewall.@rule[7].proto=tcp
firewall.@rule[7].dest_port=22
firewall.@rule[7].name=SHH
firewall.@redirect[1]=redirect
firewall.@redirect[1].target=DNAT
firewall.@redirect[1].src=wan
firewall.@redirect[1].dest=lan
firewall.@redirect[1].proto=tcp udp
firewall.@redirect[1].src_dport=445
firewall.@redirect[1].dest_ip=192.168.2.1
firewall.@redirect[1].dest_port=445
firewall.@redirect[1].name=Samba
firewall.@rule[8]=rule
firewall.@rule[8].target=ACCEPT
firewall.@rule[8].src=wan
firewall.@rule[8].proto=tcp udp
firewall.@rule[8].dest_port=445
firewall.@rule[8].name=Samba
firewall.@rule[9]=rule
firewall.@rule[9].enabled=1
firewall.@rule[9].target=ACCEPT
firewall.@rule[9].src=wan
firewall.@rule[9].proto=tcp udp
firewall.@rule[9].dest_port=21
firewall.@rule[9].name=FTP
firewall.@redirect[2]=redirect
firewall.@redirect[2].target=DNAT
firewall.@redirect[2].src=wan
firewall.@redirect[2].dest=lan
firewall.@redirect[2].proto=tcp
firewall.@redirect[2].src_dport=21
firewall.@redirect[2].dest_ip=192.168.2.1
firewall.@redirect[2].dest_port=21
firewall.@redirect[2].name=FTP

Sagem IP : 192.168.1.1 - główny ruter z neostrady u znajomego
wr740n : 192.168.3.1 -serwer pptp (u znajomego ) internet z trybu ap + ap client (ip z sagema 192.168.1.5)
mr 3420 : 192.168.1.1 Router u mnie w domu (Internet Plus Power LTE)

Plik /etc/config/pptpd  na serwerze PPTP (wr740n) :
config service 'pptpd'
    option 'enabled' '1'
    option 'localip' '192.168.3.14'
    option 'remoteip' '192.168.3.20-30'

config 'login'
    option 'username' 'Norbert'
    option 'password' 'mojehaslo'

config 'login'
    option 'username' 'Ernest'
    option 'password' 'mojehaslo'

config 'login'
    option 'username' 'Magdalena'
    option 'password' 'mojehaslo'

config 'login'
    option 'username' 'Gargoyle-USB'
    option 'password' 'mojehaslo'

Firewall na Sagemie :

http://obrazki.elektroda.pl/7985669900_1430758277_thumb.jpg http://obrazki.elektroda.pl/1534330800_1430758278_thumb.jpg http://obrazki.elektroda.pl/7983404000_1430758278_thumb.jpg

Z serwerem PPTP łączę się telefonem LG L FINO przez internet 3G z sieci Virgin Mobile
Ip jakie dostaje z serwera PPTP to 192.168.3.100
Łączę się przez nazwę użytkownika "Norbert" i hasło "mojehaslo"

23

Odp: OpenWRT BB i serwer PPTP

Mam coś jeszcze podać ?

24

Odp: OpenWRT BB i serwer PPTP

Co mam zrobić ?
Potrzebuję tego serwera na jutro bo mam ważny wyjazd

25

Odp: OpenWRT BB i serwer PPTP

To faktycznie wcześnie się za to zabrałeś. Myślisz że to jest gotowiec który dostaniesz w 2 liniach?

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