Temat: Problem z odblokowanie portu

Walcze walcze i i nie moge dojsc co zle robie.
Zainstalowany oscam na tplinku wr1043 najnowsze wrt
Chcialem dolozyc jeszcze jeden czytnik i musze odblokowac kolejny port dla tej karty.
Aktualnie wszystko dziala pieknie z jedna karta.
Odblokowalem port w ten sposob:


uci add firewall rule
uci set firewall.@rule[-1]._name=TNK
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=5013
uci commit firewall

potem
/etc/init.d/firewall restart

Port odblokowany dziala z domena pieknie .
Chcialem dodac kolejny port np 5014

uci add firewall rule
uci set firewall.@rule[-1]._name=Cyfra
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=5014
uci commit firewall

potem
/etc/init.d/firewall restart

no i tu sie dzieje problem bo port jest zablokowany.Probowalem roznych kombinacji portow i dalej nic. Komputer bezposrednio do modemu widzi port jako odblokowany wiec problem z routerem wnioskuje.



plik /etc/config/firewall


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

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

config 'zone'
    option 'name' 'wan'
    option 'network' 'wan'
    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' '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' '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'

config 'include'
    option 'path' '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'

config 'rule'
    option '_name' 'TNK'
    option 'src' 'wan'
    option 'target' 'ACCEPT'
    option 'proto' 'tcp'
    option 'dest_port' '5013'
config 'rule'
    option '_name' 'CYFRA'
    option 'src' 'wan'
    option 'target' 'ACCEPT'
    option 'proto' 'tcp'
    option 'dest_port' '5014'

config 'rule'
    option '_name' 'OSCAM'
    option 'src' 'wan'
    option 'target' 'ACCEPT'
    option 'proto' 'tcp'
    option 'dest_port' '4545'

config 'remote_accept' 'ra_80_80'
    option 'local_port' '80'
    option 'remote_port' '80'
    option 'proto' 'tcp'
    option 'zone' 'wan'

probowalem recznie dopisac rule do pliku konf firewalla jak i przez console  i nic.Oczywiscie za kazdym razem robie restart firewalla ,restart routera czy modemu tez nic nie wniosla

netstat -tulp

root@Keep Away:~$ netstat -tulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

tcp        0      0 0.0.0.0:sunrpc          0.0.0.0:*               LISTEN      905/portmap
tcp        0      0 0.0.0.0:www             0.0.0.0:*               LISTEN      2090/httpd_gargoyle
tcp        0      0 0.0.0.0:5013            0.0.0.0:*               LISTEN      2465/oscam
tcp        0      0 0.0.0.0:domain          0.0.0.0:*               LISTEN      2441/dnsmasq
tcp        0      0 0.0.0.0:ftp             0.0.0.0:*               LISTEN      2032/vsftpd
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      1907/dropbear
tcp        0      0 0.0.0.0:https           0.0.0.0:*               LISTEN      2090/httpd_gargoyle
netstat: /proc/net/tcp6: No such file or directory
udp        0      0 0.0.0.0:9999            0.0.0.0:*                           2465/oscam
udp        0      0 0.0.0.0:domain          0.0.0.0:*                           2441/dnsmasq
udp        0      0 0.0.0.0:bootps          0.0.0.0:*                           2441/dnsmasq
udp        0      0 0.0.0.0:sunrpc          0.0.0.0:*                           905/portmap
netstat: /proc/net/udp6: No such file or directory

iptables -L

 iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
syn_flood  tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
input_rule  all  --  anywhere             anywhere
input      all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
forwarding_rule  all  --  anywhere             anywhere
forward    all  --  anywhere             anywhere
reject     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
output_rule  all  --  anywhere             anywhere
output     all  --  anywhere             anywhere

Chain forward (1 references)
target     prot opt source               destination
zone_lan_forward  all  --  anywhere             anywhere
zone_wan_forward  all  --  anywhere             anywhere

Chain forwarding_lan (1 references)
target     prot opt source               destination

Chain forwarding_rule (1 references)
target     prot opt source               destination
nat_reflection_fwd  all  --  anywhere             anywhere

Chain forwarding_wan (1 references)
target     prot opt source               destination

Chain input (1 references)
target     prot opt source               destination
zone_lan   all  --  anywhere             anywhere
zone_wan   all  --  anywhere             anywhere

Chain input_lan (1 references)
target     prot opt source               destination

Chain input_rule (1 references)
target     prot opt source               destination

Chain input_wan (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www

Chain nat_reflection_fwd (1 references)
target     prot opt source               destination

Chain output (1 references)
target     prot opt source               destination
zone_lan_ACCEPT  all  --  anywhere             anywhere
zone_wan_ACCEPT  all  --  anywhere             anywhere

Chain output_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_lan (1 references)
target     prot opt source               destination
input_lan  all  --  anywhere             anywhere
zone_lan_ACCEPT  all  --  anywhere             anywhere

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

Chain zone_lan_DROP (0 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere

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

Chain zone_lan_forward (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
zone_wan_ACCEPT  all  --  anywhere             anywhere
forwarding_lan  all  --  anywhere             anywhere
zone_lan_REJECT  all  --  anywhere             anywhere

Chain zone_wan (1 references)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootpc
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5013
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5014
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:4545
input_wan  all  --  anywhere             anywhere
zone_wan_REJECT  all  --  anywhere             anywhere

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

Chain zone_wan_DROP (0 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere

Chain zone_wan_REJECT (2 references)
target     prot opt source               destination
reject     all  --  anywhere             anywhere
reject     all  --  anywhere             anywhere

Chain zone_wan_forward (1 references)
target     prot opt source               destination
forwarding_wan  all  --  anywhere             anywhere
zone_wan_REJECT  all  --  anywhere             anywhere

jakies sugestie?

2

Odp: Problem z odblokowanie portu

Dodaj jeszcze

 
uci add firewall rule
uci set firewall.@rule[-1]._name=Cyfra
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=udp
uci set firewall.@rule[-1].dest_port=5014
uci commit firewall

I restart

RB760iGS + RB260GS / Ryzen 5 2660 / 16G DDR4 / MiniITX - Inea 1G (https://i.imgur.com/TLbJVDw.png)
RB951-2HnD / Celeron J1900 / 4G DDR3 / MiniITX - Satpol 100M

3 (edytowany przez nike_bytom 2012-10-07 11:36:42)

Odp: Problem z odblokowanie portu

Dodaj jeszcze

uci add firewall rule
uci set firewall.@rule[-1]._name=Cyfra
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=udp
uci set firewall.@rule[-1].dest_port=5014
uci commit firewall
I restart

nike_bytom napisał/a:

Walcze walcze i i nie moge dojsc co zle robie.
Zainstalowany oscam na tplinku wr1043 najnowsze wrt
Chcialem dolozyc jeszcze jeden czytnik i musze odblokowac kolejny port dla tej karty.
Aktualnie wszystko dziala pieknie z jedna karta.
Odblokowalem port w ten sposob:


uci add firewall rule
uci set firewall.@rule[-1]._name=TNK
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=5013
uci commit firewall

potem
/etc/init.d/firewall restart

Port odblokowany dziala z domena pieknie .
Chcialem dodac kolejny port np 5014

uci add firewall rule
uci set firewall.@rule[-1]._name=Cyfra
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=5014
uci commit firewall

potem
/etc/init.d/firewall restart

no i tu sie dzieje problem bo port jest zablokowany.Probowalem roznych kombinacji portow i dalej nic. Komputer bezposrednio do modemu widzi port jako odblokowany wiec problem z routerem wnioskuje.


Nie kumam przeciez napisalem ze tak zrobilem na samej gorze...

4

Odp: Problem z odblokowanie portu

Przeanalizuj, i skumaj. Dodaj jest tam inny protokół.

RB760iGS + RB260GS / Ryzen 5 2660 / 16G DDR4 / MiniITX - Inea 1G (https://i.imgur.com/TLbJVDw.png)
RB951-2HnD / Celeron J1900 / 4G DDR3 / MiniITX - Satpol 100M

5 (edytowany przez nike_bytom 2012-10-07 11:43:27)

Odp: Problem z odblokowanie portu

Ok sory dodalem udp z consoli restart i dalej zablokowany
sprawdzam tu

http://www.canyouseeme.org/

sprawdzilem rule jest dodane w pliku konf firewalla a jak dam w cosnoli nentstat -tulp nie ma tam portu 5014  ;(

6

Odp: Problem z odblokowanie portu

Dodajesz do uslugi na jakims urzadzeniu podloczonym do LAN?
Ja mam takie reguły do poszczególnych IP wew.

config 'redirect' 'redirect_enabled_number_12'
    option 'name' 'ut_asus'
    option 'src' 'wan'
    option 'dest' 'lan'
    option 'proto' 'tcp'
    option 'src_dport' '50551'
    option 'dest_ip' '192.168.1.125'
    option 'dest_port' '50551'

config 'redirect' 'redirect_enabled_number_13'
    option 'name' 'ut_asus'
    option 'src' 'wan'
    option 'dest' 'lan'
    option 'proto' 'udp'
    option 'src_dport' '50551'
    option 'dest_ip' '192.168.1.125'
    option 'dest_port' '50551'
RB760iGS + RB260GS / Ryzen 5 2660 / 16G DDR4 / MiniITX - Inea 1G (https://i.imgur.com/TLbJVDw.png)
RB951-2HnD / Celeron J1900 / 4G DDR3 / MiniITX - Satpol 100M

7

Odp: Problem z odblokowanie portu

Nie wiem co moze byc  zrobilem redirect tcp i udp wedlug twojego schematu pozmienialem oczywiscie odpowiednie dane restart i dalej nic ...

8

Odp: Problem z odblokowanie portu

Ale rozumiem ze sprzwdzasz przekierowanie portu na urządzeniu na ktore to przekierowanie zostało wykonane, oraz stare wpisy zostały usunięte ? (zeby nie dublowac)

RB760iGS + RB260GS / Ryzen 5 2660 / 16G DDR4 / MiniITX - Inea 1G (https://i.imgur.com/TLbJVDw.png)
RB951-2HnD / Celeron J1900 / 4G DDR3 / MiniITX - Satpol 100M

9 (edytowany przez nike_bytom 2012-10-07 13:40:06)

Odp: Problem z odblokowanie portu

przekierowanie portu chyba nie jest tu najlepszym rozwiazaniem bo przekierowuje go do routera 192.168.1.1 tu jest oscam uruchomiony...
Dalej nie moge sobie z tym poradzic , dziwna sprawa nawet przywrocenie ustawien fabrycznych i ponownie wgranie wszystkiego to port 5013 jest juz odblokowany nawet nie majac go w rule w firewallu i nic nowego nie moge odblokowac..hmm

10

Odp: Problem z odblokowanie portu

Ale nie masz nic co nasłuchuje na porcie 5014 przecież.

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

11

Odp: Problem z odblokowanie portu

Cezary napisał/a:

Ale nie masz nic co nasłuchuje na porcie 5014 przecie.

dzieki! a ja kombinuje jak glupi ale wstyd:(Wielkie dzieki za prosta odpowiedz.
Guru Cezary:)