Temat: Sieć gościnna problem z dostępem do usługi

Witam,
mam dwa interfejsy sieciowe WiFi czy sieć podstawowa (A) w klasie adresowe 172.27.x.x oraz gościnna (B) w klasie 10.x.x.x

I mam takie problem że telefon podłączony do sieci  (A) mam dostęp po https do usługi wewnątrz sieci po zew. adresie
a do tej samej usługi podłączony do sieci (B) już dostępu nie mam.

Posługuje się zew. adresem wiec myślałem że nie ma to nic wspólnego jakie wew. IP dostaje ale widzę eksperymentalnie że ma znaczenie.

Jak to sprawdzić i co ew. włączyć na Firewall'u aby nie było problemu ?

Wszystkie posty dotyczą: TOTOLINK A7000R

2

Odp: Sieć gościnna problem z dostępem do usługi

Coś masz inaczej w firewallu w strefie "B" - czymś się różni od "A". Sprawdź w konfigu czym.

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

3

Odp: Sieć gościnna problem z dostępem do usługi

Wpisy z firewall odnośnie  sieci B (gościnnej)

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

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

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

config rule
    option src 'guest'
    option dest_port '53'
    option target 'ACCEPT'
    option family 'ipv4'
    option proto 'tcpudp'

config rule
        option src 'guest'
        option dest_port '5000'
        option target 'ACCEPT'
        option family 'ipv4'
        option proto 'tcp'


Usługa http chodzi na porcie 5000  , https na 5001 ale obie konfuguracje próbowałem i nic.

Wszystkie posty dotyczą: TOTOLINK A7000R

4

Odp: Sieć gościnna problem z dostępem do usługi

Dobra zadam pytanie inaczej :
Mam dwie sieci    A i B
czy da się jakoś pokazać sieci B jeden adres lokalnie i jeden port z tego adresu ?
czyli zrobić taki brige na jeden adres i port ??

Wszystkie posty dotyczą: TOTOLINK A7000R

5

Odp: Sieć gościnna problem z dostępem do usługi

Nie rozumiem pytania?

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

6 (edytowany przez marko_max 2014-12-01 11:02:48)

Odp: Sieć gościnna problem z dostępem do usługi

Generalnie chodzi jak taki zapis z IPTABLES zrobić w OPEN-WRT

czyli że LAN akceptuje wywołanie  IP 172.27.27.250  na porcie 5000


-A zone_lan_dest_ACCEPT -p tcp -s 10.1.1.0/24 -d 172.27.27.250/32 -dport 5000


.... Jak dokleje to do firewall.user

"iptables -A zone_lan_dest_ACCEPT -p tcp -s 10.1.1.0/24 -d 172.27.27.250/32 -dport 5000"

to mam komunikat
iptables v1.4.21: multiple -d flags not allowed

Wszystkie posty dotyczą: TOTOLINK A7000R

7

Odp: Sieć gościnna problem z dostępem do usługi

--dport

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

8 (edytowany przez build000 2014-12-01 14:36:36)

Odp: Sieć gościnna problem z dostępem do usługi

Przyjmij sobie za stałą fakt, że można w linuchu i unixopodobnych systemach opcje/przełączniki danego programu wywoływać (przede wszystkim w powłoce) z:
1) jednym myślnikiem, jak jest jedna litera/cyfra/znak określająca skrót do danej funkcjonalności
2) dwoma myślnikami jak występuje jakieś słowo/synonim, określający tą daną funkcjonalność.
Twierdzenie zgodne w 99,9 % przypadków określonego wywoływania różnych programów/funkcji/skryptów/i.t.d.
wink

EDIT:
Większość programów posiada podstawową pomoc po użyciu magicznego (analogicznie do w/w tezy) przełącznika -h lub --help.
Komentarz chyba zbędny...

9

Odp: Sieć gościnna problem z dostępem do usługi

Drogi build000

dzięki za lekcję i wyjaśnienia ale porostu czasem człowiek nie zauważy braku przysłowiowego słownika czy też myślnika .... czy tylko ja tak mam smile smile .

Tak czy siak "iptables -A zone_lan_dest_ACCEPT -p tcp -s 10.1.1.0/24 -d 172.27.27.250/32 --dport 5000"   
nie działa czyli komputery z sieci 10.1.1.0/24 nie widzą   serwera 172.27.27.250 na porcie 5000  tcp.

pytanie jak go przymusić aby widziały

Wszystkie posty dotyczą: TOTOLINK A7000R

10 (edytowany przez build000 2014-12-02 11:19:56)

Odp: Sieć gościnna problem z dostępem do usługi

To teraz dla porządku i obserwacji/weryfikacji przez tych którzy chcą pomóc jakiś link z np. wklej.org z wynikiem "iptables -L" po, jak rozumiem, udanej komendzie dodania reguły zacytowanej powyżej. Jakiś "lsmod", "route" też kontrolnie pewno warto zapodać.
I stosowne konfigi od wifi, lan, wan, firewall (A też) też pewno by nie zawadziło. To jak działają serwery na tych portach to jak rozumiem nie należy się przejmować, że coś w ich konfiguracji nie bangla (np. coś go nie blokuje w zaporze na tym adresie z B, i.t.d. ) ?
Próbowałeś wydać komendę w ten sposób ? :
"iptables --append zone_lan_dest_ACCEPT --proto tcp --source 10.1.1.0/24 --destination 172.27.27.250/32 --destination-port 5000"
Poza tym wskazanie w regule "***/32" jest niepotrzebne - tak jest domyślnie i w tym przykładzie może być nieprawidłowe. Nadal nic nie wiadomo o budowie interfejsu/ustawieniach sieciowych na 172.27.27.250.

Krótko mówiąc - więcej danych.

11

Odp: Sieć gościnna problem z dostępem do usługi

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  222.186.56.69        anywhere

delegate_input  all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
delegate_forward  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
delegate_output  all  --  anywhere             anywhere

Chain delegate_forward (1 references)
target     prot opt source               destination
forwarding_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
zone_lan_forward  all  --  anywhere             anywhere
zone_wan_forward  all  --  anywhere             anywhere
zone_guest_forward  all  --  anywhere             anywhere
reject     all  --  anywhere             anywhere

Chain delegate_input (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
input_rule  all  --  anywhere             anywhere             /* user chain for input */
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
syn_flood  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
zone_lan_input  all  --  anywhere             anywhere
zone_wan_input  all  --  anywhere             anywhere
zone_guest_input  all  --  anywhere             anywhere

Chain delegate_output (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
output_rule  all  --  anywhere             anywhere             /* user chain for output */
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
zone_lan_output  all  --  anywhere             anywhere
zone_wan_output  all  --  anywhere             anywhere
zone_guest_output  all  --  anywhere             anywhere

Chain forwarding_guest_rule (1 references)
target     prot opt source               destination

Chain forwarding_lan_rule (1 references)
target     prot opt source               destination

Chain forwarding_rule (1 references)
target     prot opt source               destination

Chain forwarding_wan_rule (1 references)
target     prot opt source               destination

Chain input_guest_rule (1 references)
target     prot opt source               destination

Chain input_lan_rule (1 references)
target     prot opt source               destination

Chain input_rule (1 references)
target     prot opt source               destination

Chain input_wan_rule (1 references)
target     prot opt source               destination

Chain output_guest_rule (1 references)
target     prot opt source               destination

Chain output_lan_rule (1 references)
target     prot opt source               destination

Chain output_rule (1 references)
target     prot opt source               destination

Chain output_wan_rule (1 references)
target     prot opt source               destination

Chain reject (5 references)
target     prot opt source               destination
REJECT     tcp  --  anywhere             anywhere             reject-with tcp-reset
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain syn_flood (1 references)
target     prot opt source               destination
RETURN     tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
DROP       all  --  anywhere             anywhere

Chain zone_guest_dest_ACCEPT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain zone_guest_forward (1 references)
target     prot opt source               destination
forwarding_guest_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
zone_wan_dest_ACCEPT  all  --  anywhere             anywhere             /* forwarding guest -> wan */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port forwards */
zone_guest_dest_ACCEPT  all  --  anywhere             anywhere

Chain zone_guest_input (1 references)
target     prot opt source               destination
input_guest_rule  all  --  anywhere             anywhere             /* user chain for input */
ACCEPT     udp  --  anywhere             anywhere             udp spts:bootps:bootpc dpts:bootps:bootpc /* @rule[5] */
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain /* @rule[6] */
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain /* @rule[6] */
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:5000 /* @rule[7] */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port redirections */
zone_guest_src_REJECT  all  --  anywhere             anywhere

Chain zone_guest_output (1 references)
target     prot opt source               destination
output_guest_rule  all  --  anywhere             anywhere             /* user chain for output */
zone_guest_dest_ACCEPT  all  --  anywhere             anywhere

Chain zone_guest_src_REJECT (1 references)
target     prot opt source               destination
reject     all  --  anywhere             anywhere

Chain zone_lan_dest_ACCEPT (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain zone_lan_dest_REJECT (1 references)
target     prot opt source               destination
reject     all  --  anywhere             anywhere

Chain zone_lan_forward (1 references)
target     prot opt source               destination
forwarding_lan_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
zone_wan_dest_ACCEPT  all  --  anywhere             anywhere             /* forwarding lan -> wan */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port forwards */
zone_lan_dest_REJECT  all  --  anywhere             anywhere

Chain zone_lan_input (1 references)
target     prot opt source               destination
input_lan_rule  all  --  anywhere             anywhere             /* user chain for input */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port redirections */
zone_lan_src_ACCEPT  all  --  anywhere             anywhere

Chain zone_lan_output (1 references)
target     prot opt source               destination
output_lan_rule  all  --  anywhere             anywhere             /* user chain for output */
zone_lan_dest_ACCEPT  all  --  anywhere             anywhere

Chain zone_lan_src_ACCEPT (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain zone_wan_dest_ACCEPT (3 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain zone_wan_dest_REJECT (1 references)
target     prot opt source               destination
reject     all  --  anywhere             anywhere

Chain zone_wan_forward (1 references)
target     prot opt source               destination
forwarding_wan_rule  all  --  anywhere             anywhere             /* user chain for forwarding */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port forwards */
zone_wan_dest_REJECT  all  --  anywhere             anywhere

Chain zone_wan_input (1 references)
target     prot opt source               destination
input_wan_rule  all  --  anywhere             anywhere             /* user chain for input */
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc /* Allow-DHCP-Renew */
ACCEPT     icmp --  anywhere             anywhere             icmp echo-request /* Allow-Ping */
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:2222 /* @rule[8] */
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT /* Accept port redirections */
zone_wan_src_REJECT  all  --  anywhere             anywhere

Chain zone_wan_output (1 references)
target     prot opt source               destination
output_wan_rule  all  --  anywhere             anywhere             /* user chain for output */
zone_wan_dest_ACCEPT  all  --  anywhere             anywhere

Chain zone_wan_src_REJECT (1 references)
target     prot opt source               destination
reject


może coś z tego wywróżysz, na pewno nic nie blokuje po stronie 172.27.27.250

Wszystkie posty dotyczą: TOTOLINK A7000R