26

Odp: Route openvpn subnet

Network

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdc0:f960:e2c2::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth1.1'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.dns='192.168.1.1'
network.wan=interface
network.wan.ifname='eth0.2'
network.wan.proto='pppoe'
network.wan.username='xxxxxxx'
network.wan.password='xxxxxxx'
network.wan.keepalive='3 5'
network.wan.ipv6='0'
network.wan6=interface
network.wan6.ifname='eth0.2'
network.wan6.proto='dhcpv6'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='2 3 4 5 0t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='1 6t'

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].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].network='wan' 'wan6'
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.@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-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].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[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@include[0].reload='1'
firewall.@include[1]=include
firewall.@include[1].type='script'
firewall.@include[1].path='/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'
firewall.@include[1].family='IPv4'
firewall.@include[1].reload='1'
firewall.openvpn_include_file=include
firewall.openvpn_include_file.path='/etc/openvpn.firewall'
firewall.openvpn_include_file.reload='1'
firewall.vpn_zone=zone
firewall.vpn_zone.name='vpn'
firewall.vpn_zone.device='tun0'
firewall.vpn_zone.input='ACCEPT'
firewall.vpn_zone.output='ACCEPT'
firewall.vpn_zone.forward='ACCEPT'
firewall.vpn_zone.mtu_fix='1'
firewall.vpn_zone.masq='1'
firewall.vpn_lan_forwarding=forwarding
firewall.vpn_lan_forwarding.src='lan'
firewall.vpn_lan_forwarding.dest='vpn'
firewall.lan_vpn_forwarding=forwarding
firewall.lan_vpn_forwarding.src='vpn'
firewall.lan_vpn_forwarding.dest='lan'
firewall.ra_openvpn=remote_accept
firewall.ra_openvpn.zone='wan'
firewall.ra_openvpn.local_port='1194'
firewall.ra_openvpn.remote_port='1194'
firewall.ra_openvpn.proto='udp'
firewall.vpn_wan_forwarding=forwarding
firewall.vpn_wan_forwarding.src='vpn'
firewall.vpn_wan_forwarding.dest='wan'
firewall.miniupnpd=include
firewall.miniupnpd.type='script'
firewall.miniupnpd.path='/usr/share/miniupnpd/firewall.include'
firewall.miniupnpd.family='any'
firewall.miniupnpd.reload='1'

OpenVPN

openvpn.custom_config=openvpn
openvpn.custom_config.script_security='3'
openvpn.custom_config.up='/etc/openvpn.up'
openvpn.custom_config.down='/etc/openvpn.down'
openvpn.custom_config.enabled='1'
openvpn.custom_config.config='/etc/openvpn/server.conf'
openvpn.sample_server=openvpn
openvpn.sample_server.enabled='0'
openvpn.sample_server.port='1194'
openvpn.sample_server.proto='udp'
openvpn.sample_server.dev='tun'
openvpn.sample_server.ca='/etc/openvpn/ca.crt'
openvpn.sample_server.cert='/etc/openvpn/server.crt'
openvpn.sample_server.key='/etc/openvpn/server.key'
openvpn.sample_server.dh='/etc/openvpn/dh1024.pem'
openvpn.sample_server.server='10.8.0.0 255.255.255.0'
openvpn.sample_server.ifconfig_pool_persist='/tmp/ipp.txt'
openvpn.sample_server.keepalive='10 120'
openvpn.sample_server.compress='lzo'
openvpn.sample_server.persist_key='1'
openvpn.sample_server.persist_tun='1'
openvpn.sample_server.user='nobody'
openvpn.sample_server.status='/tmp/openvpn-status.log'
openvpn.sample_server.verb='3'
openvpn.sample_client=openvpn
openvpn.sample_client.enabled='0'
openvpn.sample_client.client='1'
openvpn.sample_client.dev='tun'
openvpn.sample_client.proto='udp'
openvpn.sample_client.remote='my_server_1 1194'
openvpn.sample_client.resolv_retry='infinite'
openvpn.sample_client.nobind='1'
openvpn.sample_client.persist_key='1'
openvpn.sample_client.persist_tun='1'
openvpn.sample_client.user='nobody'
openvpn.sample_client.ca='/etc/openvpn/ca.crt'
openvpn.sample_client.cert='/etc/openvpn/client.crt'
openvpn.sample_client.key='/etc/openvpn/client.key'
openvpn.sample_client.compress='lzo'
openvpn.sample_client.verb='3'

Proszę

27

Odp: Route openvpn subnet

Skąd masz eth1.1 i eth0.2 na rpi? Skąd masz tam w ogóle switcha? smile

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

28

Odp: Route openvpn subnet

Na Rpi mam modem LTE zapięty - usb0, do portu lan podpinam się komputerem (do testów), docelowo wpinam go w swicha.

29

Odp: Route openvpn subnet

Pokazałeś network nie z tego routera....

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

30 (edytowany przez hejduk 2020-02-06 20:23:07)

Odp: Route openvpn subnet

Podesłałem network z routera na którym stoi serwer VPN - tp-link z garygoylem. Potrzebujesz jeszcze ten z rpi?

zdjecia z konfiguracji poniżej

https://drive.google.com/drive/folders/ … sp=sharing

ps zaraz podesle z RPI. moj blad.

31 (edytowany przez hejduk 2020-02-06 20:34:06)

Odp: Route openvpn subnet

Dane z RPI

Network

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fd18:f0a8:eea5::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0'
network.lan.proto='static'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.ipaddr='10.10.1.1'
network.WAN_LTE=interface
network.WAN_LTE.ifname='usb0'
network.WAN_LTE.proto='dhcp'

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[0].device='tun0'
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 WAN_LTE'
firewall.@zone[1].device='tun0'
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-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].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[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'

OpenVPN

openvpn.custom_config=openvpn
openvpn.custom_config.config='/etc/openvpn/my-vpn.conf'
openvpn.sample_server=openvpn
openvpn.sample_server.port='1194'
openvpn.sample_server.proto='udp'
openvpn.sample_server.dev='tun'
openvpn.sample_server.ca='/etc/openvpn/ca.crt'
openvpn.sample_server.cert='/etc/openvpn/server.crt'
openvpn.sample_server.key='/etc/openvpn/server.key'
openvpn.sample_server.dh='/etc/openvpn/dh1024.pem'
openvpn.sample_server.server='10.8.0.0 255.255.255.0'
openvpn.sample_server.ifconfig_pool_persist='/tmp/ipp.txt'
openvpn.sample_server.keepalive='10 120'
openvpn.sample_server.compress='lzo'
openvpn.sample_server.persist_key='1'
openvpn.sample_server.persist_tun='1'
openvpn.sample_server.user='nobody'
openvpn.sample_server.status='/tmp/openvpn-status.log'
openvpn.sample_server.verb='3'
openvpn.sample_client=openvpn
openvpn.sample_client.client='1'
openvpn.sample_client.dev='tun'
openvpn.sample_client.proto='udp'
openvpn.sample_client.remote='my_server_1 1194'
openvpn.sample_client.resolv_retry='infinite'
openvpn.sample_client.nobind='1'
openvpn.sample_client.persist_key='1'
openvpn.sample_client.persist_tun='1'
openvpn.sample_client.user='nobody'
openvpn.sample_client.ca='/etc/openvpn/ca.crt'
openvpn.sample_client.cert='/etc/openvpn/client.crt'
openvpn.sample_client.key='/etc/openvpn/client.key'
openvpn.sample_client.compress='lzo'
openvpn.sample_client.verb='3'
openvpn.xxxx=openvpn
openvpn.xxxx.config='/etc/openvpn/xxxx.ovpn'
openvpn.xxxx.enabled='1'

Na malinie, po zainstalowaniu openvpn dla LUCI, uploadowałem plik ovpn i na jego podstawie stworzyło się połączenie.

32

Odp: Route openvpn subnet

Po pierwsze - zapomnij o luci. Nigdy nie rób takich rzeczy przez luci bo sobie krzywdę zrobisz.
Po drugie - Źle masz to zrobione, wywal z firewallu to device tun0 (źle coś zaklikałeś), zrób sekcję w network o nazwie vpn, i zezwól na firewallu na odpowiednie rzeczy: punkty 6 i 7 z https://eko.one.pl/forum/viewtopic.php? … 01#p210001

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

33 (edytowany przez hejduk 2020-02-06 20:53:50)

Odp: Route openvpn subnet

Sprawdziłem,
pousuwałem te tun0 z ustawien firewalla, dodałem komendy zgodnie z przytoczonym artykułem. Niestety dalej router z serwerem vpn nie jest w stanie spingować komputera podłaczonego do klienta po lan'ie.

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[0].device='tun0'
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 WAN_LTE'
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-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].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[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@zone[2]=zone
firewall.@zone[2].name='vpn'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].forward='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].network='vpn'
firewall.@zone[2].masq='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='lan'
firewall.@forwarding[1].dest='vpn'

34

Odp: Route openvpn subnet

A co ze mną? Nie lepiej otworzyć swój temat niż robić tu śmietnik?

35

Odp: Route openvpn subnet

Czy komputer podłączony do rpi ma ustawiony poprawnie gateway? Jeżeli tak to pokaż wynik

route -n

z rpi. Zrób też dodatkowo

uci add firewall forwarding
uci set firewall.@forwarding[-1].dest='lan'
uci set firewall.@forwarding[-1].src='vpn'
uci commit firewall

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

36

Odp: Route openvpn subnet

PS. Nadal zostawiłeś

firewall.@zone[0].device='tun0'

w firewallu.

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

37

Odp: Route openvpn subnet

l1ght napisał/a:

A co ze mną? Nie lepiej otworzyć swój temat niż robić tu śmietnik?

Nadal czekam. Nadal czekam  aż wpadniesz na to pokazanie kawałka traceroute nic nie daje jeżeli nie pokazałeś konfiguracji jak właściwie masz to ustawione.

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

38 (edytowany przez hejduk 2020-02-06 21:07:25)

Odp: Route openvpn subnet

Cezary,
a czy polecenie "uci set network.vpn.ifname=tun0" nie tworzy parametru TUN0?

Usunałem je z firewalla, uci show firewall nie pokazuje niczego z tun0, mimo to dalej pingowanie mojego komputera nie działa.

Jezeli chodzi o gateway na komputerze (i inne ustawienia) - ip 10.10.1.26, maska 255.255.255.0, gateway 10.10.1.1

39

Odp: Route openvpn subnet

Nie tworzy. To tylko przypisane interfejsu do sekcji konfiguracyjnej. openvpn go tworzy.

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

40 (edytowany przez hejduk 2020-02-06 21:20:21)

Odp: Route openvpn subnet

Cezary, przychodzi Ci do głowy jakiś pomysł? Czy może postawić na nowo openwrt na malinie, i skonfigurować VPN'a wg Twojego poradnika do którego się odwoływałeś z punktami 6 i 7 ? Jak bedzie wyglądać kwestia dostępu do sieci lan klienta od strony serwera?

41

Odp: Route openvpn subnet

hejduk napisał/a:

Cezary, przychodzi Ci do głowy jakiś pomysł? Czy może postawić na nowo openwrt na malinie, i skonfigurować VPN'a wg Twojego poradnika do którego się odwoływałeś z punktami 6 i 7 ? Jak bedzie wyglądać kwestia dostępu do sieci lan klienta od strony serwera?

Po raz trzeci - pokaż w końcu ten routing z rpi.

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

42 (edytowany przez hejduk 2020-02-06 21:24:18)

Odp: Route openvpn subnet

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 usb0
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
10.10.1.0       0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 usb0
192.168.1.0     10.8.0.1        255.255.255.0   UG    0      0        0 tun0

43

Odp: Route openvpn subnet

Pokaż jeszcze route -n z gargoyle

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

44

Odp: Route openvpn subnet

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         83.1.4.56       0.0.0.0         UG    0      0        0 pppoe-wan
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
10.10.1.0       10.8.0.4        255.255.255.0   UG    0      0        0 tun0
83.1.4.56       0.0.0.0         255.255.255.255 UH    0      0        0 pppoe-wan
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0.2

45

Odp: Route openvpn subnet

Routing masz. Jeżeli czegoś nie przegapiłem to tylko kwesta firewalla.  Zrób na obu na chwilę

iptables -I FORWARD -j ACCEPT

i zobacz czy pingowanie ruszy. Upewnij się także że klient nie ma żadnego firewalla czy anywirusa który blokuje dostęp do niego.

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

46 (edytowany przez hejduk 2020-02-06 22:37:20)

Odp: Route openvpn subnet

Cezary,
zadziałało, dziękuje!
Wpis ten potrzebny jest na routerze z serwerem VPN, czym ten wpis grozi?

47

Odp: Route openvpn subnet

Odblokowałeś forward wszystkiego ze wszystkim. Czyli to kwestia odblokowania firewalla, uszczelnij sobie regułę na określone adresy ip które masz i tyle.

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

48 (edytowany przez l1ght 2020-02-06 22:42:06)

Odp: Route openvpn subnet

Cezary napisał/a:
l1ght napisał/a:

A co ze mną? Nie lepiej otworzyć swój temat niż robić tu śmietnik?

Nadal czekam. Nadal czekam  aż wpadniesz na to pokazanie kawałka traceroute nic nie daje jeżeli nie pokazałeś konfiguracji jak właściwie masz to ustawione.

Proszę smile

cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option flow_offloading '1'
#--------------ZONES----------------
config zone
        option name 'lan'
        list network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

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

config zone
        option name 'vpnout'
        list network 'vpnout'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'guest'
        list network 'guest'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'nordvpn'
        list network 'nordvpn'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'

#--------FORWARDING NETS---------

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

config forwarding
        option src 'lan'
        option dest 'guest'

config forwarding
        option src 'lan'
        option dest 'vpnout'

config forwarding
        option src 'guest'
        option dest 'nordvpn'

config forwarding
        option src 'vpnout'
        option dest 'nordvpn'

config forwarding
        option src 'lan'
        option dest 'nordvpn'


#-----------------DHCP-------------

config rule
        option name 'Allow DHCP request GUEST'
        option src 'guest'
        option src_port '67-68'
        option dest_port '67-68'
        option proto 'udp'
        option target 'ACCEPT'

config rule
        option name 'Allow DNS Queries GUEST'
        option src 'guest'
        option dest_port '53'
        option proto 'tcp udp'
        option target 'ACCEPT'

config rule
        option name 'Allow DHCP request VPNOUT'
        option src 'vpnout'
        option src_port '67-68'
        option dest_port '67-68'
        option proto 'udp'
        option target 'ACCEPT'

config rule
        option name 'Allow DNS Queries VPNOUT'
        option src 'vpnout'
        option dest_port '53'
        option proto 'tcp udp'
        option target 'ACCEPT'

#--------REST STUFF --------

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-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        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 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

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

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdeb:8aa2:48a5::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.10'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'
        option peerdns '0'
        list dns '103.86.96.100'
        list dns '103.86.99.100'
        list dns '8.8.8.8'
        list dns '8.8.4.4'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '10'
        option ports '4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '11'
        option ports '4t 6t'

config switch_vlan
        option device 'switch0'
        option vlan '12'
        option ports '1 3 3 6t'

config interface 'guest'
        option type 'bridge'
        option ifname 'eth1.11'
        option proto 'static'
        option ipaddr '192.168.11.1'
        option netmask '255.255.255.0'

config interface 'vpnout'
        option type 'bridge'
        option ifname 'eth1.12'
        option proto 'static'
        option ipaddr '192.168.12.1'
        option netmask '255.255.255.0'

config interface 'nordvpn'
        option proto 'none'
        option ifname 'tun0'
cat /etc/config/vpnbypass
config vpnbypass 'config'
        optionn name 'allow_lan'
        option enabled          '1'
        list localsubnet        '192.168.10.0/24'

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.7.2.1        128.0.0.0       UG    0      0        0 tun0
default         10.5.56.1       0.0.0.0         UG    0      0        0 eth0.2
10.5.56.0       *               255.255.248.0   U     0      0        0 eth0.2
10.7.2.0        *               255.255.255.0   U     0      0        0 tun0
128.0.0.0       10.7.2.1        128.0.0.0       UG    0      0        0 tun0
192.168.10.0    *               255.255.255.0   U     0      0        0 br-lan
192.168.11.0    *               255.255.255.0   U     0      0        0 br-guest
192.168.12.0    *               255.255.255.0   U     0      0        0 br-vpnout
212.7.222.107   10.5.56.1       255.255.255.255 UGH   0      0        0 eth0.2

btw mogą być 4 wpisy w dns-ie w interface w /etc/config/network? Czy łapie tylko 2 pierwsze?

49

Odp: Route openvpn subnet

Zezwoliłeś na lan -> guest/vpnout, ale w drugą stronę nie. A potrzebujesz to żeby uzyskać odpowiedź jeżeli chcesz się z lanu dostać gdzieś.

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

50

Odp: Route openvpn subnet

No nie prazy w forwarding teraz mam tak:

#--------FORWARDING NETS---------

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

config forwarding
        option src 'lan'
        option dest 'guest'

config forwarding
        option src 'lan'
        option dest 'vpnout'

config forwarding
        option src 'guest'
        option dest 'nordvpn'

config forwarding
        option src 'vpnout'
        option dest 'nordvpn'

config forwarding
        option src 'lan'
        option dest 'nordvpn'

config forwarding
        option src 'vpnout'
        option dest 'lan'

config forwarding
        option src 'guest'
        option dest 'lan'