Temat: Sieć gościnna - brak komunikacji ze światem

Witam,

Skonfigurowałem kiedyś sieć gościnną zgodnie z poradnikiem na http://openrouter.info/forum/viewtopic. … &t=967 i kiedyś to działało.

Za jakiś czas sieć gościnna przestała być widoczna i skonfigurowałem wszystko jeszcze raz.
Klient połączony z siecią gościnną dostaje adres z DHCP ale nie może otworzyć google.pl ani żadnej innej strony.

Poniżej konfiguracja

root@Gargoyle:~# uci show wireless

wireless.radio0=wifi-device
wireless.radio0.type=mac80211
wireless.radio0.hwmode=11ng
wireless.radio0.path=platform/ath9k
wireless.radio0.htmode=HT20
wireless.radio0.ht_capab=SHORT-GI-40 DSSS_CCK-40
wireless.radio0.noscan=1
wireless.radio0.channel=1
wireless.ap_g=wifi-iface
wireless.ap_g.device=radio0
wireless.ap_g.mode=ap
wireless.ap_g.network=lan
wireless.ap_g.ssid=WiFi_PM
wireless.ap_g.encryption=psk
wireless.ap_g.key=**********
wireless.guest=wifi-iface
wireless.guest.device=radio0
wireless.guest.mode=ap
wireless.guest.network=guest
wireless.guest.ssid=WiFi_PM_Gosc
wireless.guest.encryption=psk
wireless.guest.key=**********


root@Gargoyle:~# uci show 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.lan=interface
network.lan.ifname=eth0.1
network.lan.type=bridge
network.lan.proto=static
network.lan.ipaddr=192.168.1.1
network.lan.netmask=255.255.255.0
network.lan.dns=208.67.222.222 208.67.220.220
network.wan=interface
network.wan.ifname=eth0.2
network.wan.proto=static
network.wan.ipaddr=192.168.100.2
network.wan.netmask=255.255.255.0
network.wan.gateway=192.168.100.1
network.wan.dns=208.67.222.222 208.67.220.220
network.wan.peerdns=0
network.@switch[0]=switch
network.@switch[0].name=rtl8366rb
network.@switch[0].reset=1
network.@switch[0].enable_vlan=1
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device=rtl8366rb
network.@switch_vlan[0].vlan=1
network.@switch_vlan[0].ports=1 2 3 4 5t
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device=rtl8366rb
network.@switch_vlan[1].vlan=2
network.@switch_vlan[1].ports=0 5t
network.vpn=interface
network.vpn.ifname=tun0
network.vpn.proto=none
network.vpn.defaultroute=0
network.vpn.peerdns=0
network.guest=interface
network.guest.proto=static
network.guest.netmask=255.255.255.0
network.guest.ipaddr=10.20.30.1
network.guest.type=bridge

root@Gargoyle:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded=1
dhcp.@dnsmasq[0].boguspriv=1
dhcp.@dnsmasq[0].filterwin2k=0
dhcp.@dnsmasq[0].localise_queries=1
dhcp.@dnsmasq[0].rebind_protection=1
dhcp.@dnsmasq[0].rebind_localhost=1
dhcp.@dnsmasq[0].local=/lan/
dhcp.@dnsmasq[0].domain=lan
dhcp.@dnsmasq[0].expandhosts=1
dhcp.@dnsmasq[0].nonegcache=0
dhcp.@dnsmasq[0].authoritative=1
dhcp.@dnsmasq[0].readethers=1
dhcp.@dnsmasq[0].leasefile=/tmp/dhcp.leases
dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
dhcp.lan=dhcp
dhcp.lan.interface=lan
dhcp.lan.start=100
dhcp.lan.limit=150
dhcp.lan.leasetime=12h
dhcp.wan=dhcp
dhcp.wan.interface=wan
dhcp.wan.ignore=1
dhcp.guest=dhcp
dhcp.guest.start=100
dhcp.guest.interface=guest
dhcp.guest.limit=120
dhcp.guest.leasetime=1h
root@Gargoyle:~#




root@Gargoyle:~# 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].network=lan
firewall.@zone[0].input=ACCEPT
firewall.@zone[0].output=ACCEPT
firewall.@zone[0].forward=REJECT
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-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 pacet-too-big time-exceeded bad-header unknown-header-type router-solicitation neihbour-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 pacet-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.@include[0].reload=1
firewall.@include[1]=include
firewall.@include[1].type=script
firewall.@include[1].path=/usr/lib/gargoyle_firewall_util/gargoyle_additions.fiewall
firewall.@include[1].family=IPv4
firewall.@include[1].reload=1
firewall.miniupnpd=include
firewall.miniupnpd.type=script
firewall.miniupnpd.path=/usr/share/miniupnpd/firewall.include
firewall.miniupnpd.family=IPv4
firewall.miniupnpd.reload=1
firewall.openvpn_include_file=include
firewall.openvpn_include_file.path=/etc/openvpn.firewall
firewall.openvpn_include_file.reload=1
firewall.ra_443_444=remote_accept
firewall.ra_443_444.local_port=443
firewall.ra_443_444.remote_port=444
firewall.ra_443_444.proto=tcp
firewall.ra_443_444.zone=wan
firewall.ra_22_2200=remote_accept
firewall.ra_22_2200.local_port=22
firewall.ra_22_2200.remote_port=2200
firewall.ra_22_2200.proto=tcp
firewall.ra_22_2200.zone=wan
firewall.@rule[5]=rule
firewall.@rule[5].name=wwwmeteo
firewall.@rule[5].src=wan
firewall.@rule[5].target=ACCEPT
firewall.@rule[5].proto=tcp
firewall.@rule[5].dest_port=81
firewall.vpn_zone=zone
firewall.vpn_zone.name=vpn
firewall.vpn_zone.network=vpn
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.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.@zone[2]=zone
firewall.@zone[2].name=guest
firewall.@zone[2].network=guest
firewall.@zone[2].output=ACCEPT
firewall.@zone[2].forward=REJECT
firewall.@zone[2].input=REJECT
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src=guest
firewall.@forwarding[1].dest=wan
firewall.@rule[6]=rule
firewall.@rule[6].src=guest
firewall.@rule[6].proto=udp
firewall.@rule[6].src_port=67-68
firewall.@rule[6].dest_port=67-68
firewall.@rule[6].target=ACCEPT
firewall.@rule[6].family=ipv4
firewall.@rule[7]=rule
firewall.@rule[7].src=guest
firewall.@rule[7].dest_port=53
firewall.@rule[7].target=ACCEPT
firewall.@rule[7].family=ipv4
firewall.@rule[7].proto=tcpudp
firewall.@zone[3]=zone
firewall.@zone[3].name=guest
firewall.@zone[3].network=guest
firewall.@zone[3].input=REJECT
firewall.@zone[3].output=ACCEPT
firewall.@zone[3].forward=REJECT
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src=guest
firewall.@forwarding[2].dest=wan
firewall.@rule[8]=rule
firewall.@rule[8].src=guest
firewall.@rule[8].proto=udp
firewall.@rule[8].src_port=67-68
firewall.@rule[8].dest_port=67-68
firewall.@rule[8].target=ACCEPT
firewall.@rule[8].family=ipv4
firewall.@rule[9]=rule
firewall.@rule[9].src=guest
firewall.@rule[9].dest_port=53
firewall.@rule[9].target=ACCEPT
firewall.@rule[9].family=ipv4
firewall.@rule[9].proto=tcpudp
root@Gargoyle:~#

Może coś w firewall mam źle skonfigurowane?
Proszę o wskazówki.
Pozdr.

2

Odp: Sieć gościnna - brak komunikacji ze światem

A pingi przechodzą?

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

3

Odp: Sieć gościnna - brak komunikacji ze światem

Na pingi nie odpowiada nawet interfejs routera, ani guest ani lan.

4

Odp: Sieć gościnna - brak komunikacji ze światem

Adres ip dostałeś? Jaki?

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

5

Odp: Sieć gościnna - brak komunikacji ze światem

Klient dostaje adres:
10.20.30.113
255.255.255.0
DG: 10.20.30.1
DNS 10.20.30.1

Może coś w firewall należy zmienić?

6

Odp: Sieć gościnna - brak komunikacji ze światem

Masz dwa razy zone guest zrobioną, choć chyba to nie powinno to mieć znaczenia.

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

7 (edytowany przez m_a_c_i_e_j 2016-01-21 20:07:29)

Odp: Sieć gościnna - brak komunikacji ze światem

Witam,
podepnę się pod temat, bo mam niemalże identyczny przypadek. Proszę o pomoc.
Pingi idą ale tylko jeśli wpiszę zamiast www... jej odpowiednik w postaci IP.
Ostatecznie udało mi się ustalić, że sieć gościnna działa jeśli na kliencie ręcznie ustawię DNS. IP jest przydzielany automatycznie. Poniżej moje pliki konfiguracyjne.
/etc/config/network
Kod:

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

config interface 'lan'
    option ifname 'eth0.1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option dns '192.168.1.1'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

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

config switch_vlan
    option device 'rtl8366rb'
    option vlan '1'
    option ports '1 2 3 4 5t'

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

config interface 'guest'
        option ifname 'eth0.3'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '10.0.0.1'
        option macaddr 'XX:XX:XX:XX:XX:XX'

/etc/config/wireless
Kod:

config wifi-device 'radio0'
    option type 'mac80211'
    option path 'platform/ath9k'
    option htmode 'HT20'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'DSSS_CCK-40'
    option noscan '1'
    option hwmode '11ng'
    option channel '9'

config wifi-iface 'ap_g'
    option device 'radio0'
    option mode 'ap'
    option network 'lan'
    option disassoc_low_ack '0'
    option macfilter 'allow'
    option maclist '00:11:22:33:44:55'
    option ssid 'xxxxx'
    option encryption 'psk2'
    option key 'xxxxxxxx'

config wifi-iface 'ap_g2'
    option device 'radio0'
    option network 'guest'
    option mode 'ap'
    option macaddr 'XX:XX:XX:XX:XX:XX'
    option ssid 'Guest'
    option encryption 'psk2'
    option key 'yyyyyyyy'
    option isolate '1'

/etc/config/dhcp
Kod:

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'
    list rebind_domain 'free.aero2.net.pl'

config dhcp 'lan'
    option interface 'lan'
    option leasetime '12h'
    option start '10'
    option limit '51'

config dhcp 'wan'
    option interface 'wan'
    option ignore '1'

config dhcp 'guest'
    option interface 'guest'
    option start '100'
    option limit '150'
    option leasetime '12h'

/etc/config/firewall
Kod:

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

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

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 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 include
    option path '/etc/firewall.user'
    option reload '1'

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

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

config include 'openvpn_include_file'
    option path '/etc/openvpn.firewall'
    option reload '1'

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

config forwarding
        option src 'guest'
        option dest 'wan'

config rule
        option src 'guest'
        option dest_port '53'
        option proto 'tcpudp'
        option targe 'ACCEPT'

config rule
        option src 'guest'
        option src_port '67-68'
        option dest_port '67-68'
        option proto 'udp'
        option target 'ACCEPT'

/etc/resolv.conf
Kod:

nameserwer 192.168.1.1

/tmp/resolv.conf.auto
Kod:

# Interface lan
nameserver 208.67.222.222
nameserver 208.67.220.220
# Interface wan
nameserver 208.67.222.222
nameserver 208.67.220.220

8

Odp: Sieć gościnna - brak komunikacji ze światem

nameserwer 192.168.1.1

A domyślnie ma być nameserver 192.168.1.1. Jeżeli klient dostanie ip od sieci gościnnej to jaki dostaje dns i gateway?

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

9 (edytowany przez m_a_c_i_e_j 2016-01-20 00:56:20)

Odp: Sieć gościnna - brak komunikacji ze światem

Wcześniej miałem extroota, po przywróceniu standardowej konfiguracji w etc/resolv.conf jest nameserver 127.0.0.1 w /tmp/resolv.conf.auto nameserver 127.0.0.1 dla lan i nameserver 62.21.99.94 oraz nameserver 62.21.99.95 dla wan. Nadal gość nie dostaje DNS, a gateway jest 10.0.0.1

10

Odp: Sieć gościnna - brak komunikacji ze światem

Powinien. Wymuś na nim wysłanie: http://eko.one.pl/?p=openwrt-konfigurac … lientwdhcp

Oczywiście podając guest a nie lan. Tego extroota - czasami nośnika nie miałeś formatowanego pod ubuntu?

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

11

Odp: Sieć gościnna - brak komunikacji ze światem

Cezary - wielkie dzięki, wszystko działa jak należy.
A co do extroota, możliwe że robiłem go na ubuntu, debianie lub kali linux.

12

Odp: Sieć gościnna - brak komunikacji ze światem

Bo wtedy nie działa dnsmasq z jakiegoś magicznego powodu...

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

13

Odp: Sieć gościnna - brak komunikacji ze światem

Taki mały problemik.
Mam pierwszy router (192.168.1.2 i 172.16.0.1) z WiFi i portami LAN, do LAN (192.168.1.0/24) jest podpięty drugi router 4G(192.168.1.1), który jest wyjściem na świat.
Na pierwszym routerze ustawiłem sieć gościnną (172.16.0.0/24) zgodnie z opisem na eko.one.pl.

Nie wiem, jak wskazać sieci gościnnej, że wyjście na świat jest pod adresem 192.168.1.1 z zachowaniem ograniczeń dla sieci gościnnej, czyli brak dostępu do innych komputerów w LAN.

14

Odp: Sieć gościnna - brak komunikacji ze światem

Masz drugi router z drugim drugim dostępem do internetu który  podpięty jest pod lan, dobrze zrozumiałem?
To będziesz strasznie kombinował z firewalem. Wydziel ten port lan jako drugi wan, i zrób przez mwan3 lub https://eko.one.pl/?p=openwrt-routing odpowiedni routing.

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

15

Odp: Sieć gościnna - brak komunikacji ze światem

Sytuacja jest prostsza, jest tylko jeden dostęp do internetu, przez drugi router z 4G. Pierwszy router ma pełnić rolę emitera sieci gościnnej i przedłużenia sygnału dla urządzeń, które nie łapią się w zasięg routera 4G.
Jedyny problem to jak pokazać sieci gość, że internet jest na adresie 192.168.1.1?
Nie mogę przemianować portu lan na wan, bo chcę, żeby w pierwszy router jednocześnie pełnił rolę switcha rozszerzającego sieć 192.168.1.0/24 routera 4G.
Próbowałem jakichś konfiguracji firewalla na podstawie tematów typu: https://openrouter.info/forum/viewtopic … p;start=40 czy https://eko.one.pl/forum/viewtopic.php?id=19657 ale coś źle rozumiem i nie mogę sobie z tematem poradzić.

16

Odp: Sieć gościnna - brak komunikacji ze światem

Czyli masz po prostu ap dodatkowy. Wtedy robisz vlany: https://eko.one.pl/?p=openwrt-vlan#siew … ednymkablu
O taki scenariusz ci chodzi? Oczywiście ten 4G musi umieć taki vlan obsłużyć, jak masz tam openwrt to problemu nie ma.

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

17

Odp: Sieć gościnna - brak komunikacji ze światem

Huawei B528s-23a więc chyba nie ma tam takiej możliwości.
Nie da się jakoś firewalla ustawić, żeby cały ruch z 172.16.0.0/24 szedł na adres 192.168.1.1 i chyba odwrotnie też musi iść.
Tak sobie myślę, że może analogicznie jak udostępnianie jednego adresu drukarki, tak jak tu była dyskusja: https://openrouter.info/forum/viewtopic … p;start=20 , da się udostępnić adres 192.168.1.1 żeby w ten sposób internet szedł do sieci gość?

18

Odp: Sieć gościnna - brak komunikacji ze światem

To podłącz ten pierwszy normalnie przez wan, zrób nat  i zrobisz jednocześnie i normalną sieć i gościnną.

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