30 Kwietnia 2025 13:44:35
Nawigacja
· Strona Główna
· Forum

· Tomato by Shibby
· FreshTomato


Wątki na forum
Najnowsze dyskusje
· Router do światłow...
· r6400v2 bład przy u...
· [sprzedam] Asus RT-A...
· Netia IPv6
· Multiroom N z wykorz...
· [S] Ubiquity Edgerou...
· [MOD] FreshTomato-AR...
· Nowe routery: UX, UC...
· asus rt-ax86u pro z ...
· Zmiana OpenVPN na wi...
· [S]UBIQUITI EdgeRout...
· Zaawansowana konfigu...
· ByPass VPN dla wybra...
· [MOD] FreshTomato-MI...
· Komputer Serwer
· Ciągle rozłączani...
· Wersje Freshtomato d...
· FreshTomato- WAN inn...
· Pojemniki na FreshTo...
· [K] Obudowę Kompute...
Najpopularniejsze obecnie wątki
· Router do świat... [6]
· Netia IPv6 [5]
· r6400v2 bład prz... [3]
· [sprzedam] Asus R... [0]
Ankieta
Jaki procesor posiada twój router?

Broadcom MIPSEL
Broadcom MIPSEL
36% [152 głosów]

Broadcom ARM
Broadcom ARM
52% [219 głosów]

Atheros
Atheros
5% [22 głosów]

Marvell
Marvell
1% [4 głosów]

Ralink
Ralink
1% [3 głosów]

Intel/AMD/VIA
Intel/AMD/VIA
1% [5 głosów]

Żaden z powyższych
Żaden z powyższych
4% [15 głosów]

Ogółem głosów: 420
Musisz zalogować się, aby móc zagłosować.
Rozpoczęto: 02/02/2015 09:38
Twoje IP
3.148.236.97
Zobacz wątek
OpenLinksys » :: OPROGRAMOWANIE :: » OpenWrt - firmware
 Drukuj wątek
firewall na Kamikaze (8.09.2, r18961) w routerze linksys wrt54gs v4
lukaz1987
Ostanio zestawiłem połączenie AP (router ASUS WL-500g Premium - OpenWrt Attitude Adjustment 12.09, r36088) - AP Client (router linksys wrt54gs v4 - Kamikaze (8.09.2, r18961) na asusie firewall nie sprawia problemów z udostępnianiem i przekierowaniem portów lecz na linksysie już tak. Na początek zamieszę pliki konfiguracyjne:


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 'input' 'REJECT'
   option 'output' 'ACCEPT'
   option 'forward' 'REJECT'
   option 'masq' '1'
   option 'mtu_fix' '1'
   option 'network' 'wan'

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

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

config 'forwarding'
   option 'src' 'lan'
   option 'dest' 'wwan'

config 'rule'
   option 'src' 'wan'
   option 'proto' 'udp'
   option 'dest_port' '68'
   option 'target' 'ACCEPT'

config 'rule'
   option 'src' 'wwan'
   option 'proto' 'udp'
   option 'dest_port' '68'
   option 'target' 'ACCEPT'

config 'rule'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'name' 'ssh'
   option 'dest_port' '2222'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'ssh'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'src_dport' '2222'
   option 'dest_port' '2222'
   option 'dest_ip' '192.168.2.1'

config 'rule'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'name' 'WWW'
   option 'dest_port' '8082'

config 'rule'
   option 'name' 'IP_CAM_1_WWW'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'dest_port' '8083'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'IP_CAM_1_WWW'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'src_dport' '8083'
   option 'dest_port' '8083'
   option 'dest_ip' '192.168.2.128'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'WWW'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'src_dport' '8082'
   option 'dest_port' '8082'
   option 'dest_ip' '192.168.2.1'

config 'rule'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'name' 'hp_ssh'
   option 'dest_port' '2223'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'hp_ssh'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'src_dport' '2223'
   option 'dest_port' '22'
   option 'dest_ip' '192.168.2.67'

config 'rule'
   option 'name' 'rtsp'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'dest_port' '554'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'rtsp'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'dest_port' '554'
   option 'dest_ip' '192.168.2.128'

config 'rule'
   option 'name' 'IP_CAM_1_UDP'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'udp'
   option 'dest_port' '37778'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'IP_CAM_1_UDP'
   option 'src' 'wwan'
   option 'proto' 'udp'
   option 'dest_port' '37778'
   option 'dest_ip' '192.168.2.128'

config 'rule'
   option 'name' 'IP_CAM_1_TCP'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcp'
   option 'dest_port' '37777'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'IP_CAM_1_TCP'
   option 'src' 'wwan'
   option 'proto' 'tcp'
   option 'dest_port' '37777'
   option 'dest_ip' '192.168.2.128'

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




Wszystkie reguły działają oprócz dwóch ostatnich:



config 'rule'
   option 'name' 'IP_CAM_1_UDP'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'udp'
   option 'dest_port' '37778'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'IP_CAM_1_UDP'
   option 'src' 'wwan'
   option 'proto' 'udp'
   option 'dest_port' '37778'
   option 'dest_ip' '192.168.2.128'

config 'rule'
   option 'name' 'IP_CAM_1_TCP'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcp'
   option 'dest_port' '37777'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'IP_CAM_1_TCP'
   option 'src' 'wwan'
   option 'proto' 'tcp'
   option 'dest_port' '37777'
   option 'dest_ip' '192.168.2.128'




A taka ciekawostka jak przeniosę te reguły przed regułą:


config 'rule'
   option 'name' 'rtsp'
   option 'src' 'wwan'
   option 'target' 'ACCEPT'
   option 'proto' 'tcpudp'
   option 'dest_port' '554'

config 'redirect'
   option 'target' 'DNAT'
   option 'name' 'rtsp'
   option 'src' 'wwan'
   option 'proto' 'tcpudp'
   option 'dest_port' '554'
   option 'dest_ip' '192.168.2.128'


To już reguły z portem 37777 i 37778 działają a reguła z portem 554 przestaje działać. Nie wiem czy coś źle robię przy konfiguracji czy to jakiś błąd oprogramowania. Nawet przywracałem ustawienia do ustawień fabrycznych z ponownym ustawieniem firewalla. Przy każdej zmianie reguł firewalla wykonywałem /etc/init.d/firewall reload i /etc/init.d/firewall restart. Też sprawdzałem czy nie ma pustych znaków w configu.


Log z iptables -L


Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            state INVALID
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         
zone_wwan_MSSFIX  all  --  anywhere             anywhere           
zone_wan_MSSFIX  all  --  anywhere             anywhere           
DROP       all  --  anywhere             anywhere            state INVALID
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         
DROP       all  --  anywhere             anywhere            state INVALID
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_wwan_forward  all  --  anywhere             anywhere           
zone_lan_forward  all  --  anywhere             anywhere           

Chain forwarding_lan (1 references)
target     prot opt source               destination         

Chain forwarding_rule (1 references)
target     prot opt source               destination         

Chain forwarding_wan (1 references)
target     prot opt source               destination         

Chain forwarding_wwan (1 references)
target     prot opt source               destination         

Chain input (1 references)
target     prot opt source               destination         
zone_wwan  all  --  anywhere             anywhere           
zone_lan   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         

Chain input_wwan (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           
zone_wwan_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_MSSFIX (0 references)
target     prot opt source               destination         
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU

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         
zone_wwan_ACCEPT  all  --  anywhere             anywhere           
zone_wan_ACCEPT  all  --  anywhere             anywhere           
forwarding_lan  all  --  anywhere             anywhere           
zone_lan_REJECT  all  --  anywhere             anywhere           

Chain zone_wan (0 references)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere            udp dpt:68
input_wan  all  --  anywhere             anywhere           
zone_wan_REJECT  all  --  anywhere             anywhere           

Chain zone_wan_ACCEPT (2 references)
target     prot opt source               destination         

Chain zone_wan_DROP (0 references)
target     prot opt source               destination         

Chain zone_wan_MSSFIX (1 references)
target     prot opt source               destination         

Chain zone_wan_REJECT (2 references)
target     prot opt source               destination         

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

Chain zone_wwan (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:37777
ACCEPT     udp  --  anywhere             anywhere            udp dpt:37778
ACCEPT     udp  --  anywhere             anywhere            udp dpt:554
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:554
ACCEPT     udp  --  anywhere             anywhere            udp dpt:2223
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:2223
ACCEPT     udp  --  anywhere             anywhere            udp dpt:8083
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8083
ACCEPT     udp  --  anywhere             anywhere            udp dpt:8082
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8082
ACCEPT     udp  --  anywhere             anywhere            udp dpt:2222
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:2222
ACCEPT     udp  --  anywhere             anywhere            udp dpt:68
input_wwan  all  --  anywhere             anywhere           
zone_wwan_ACCEPT  all  --  anywhere             anywhere           

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

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

Chain zone_wwan_MSSFIX (1 references)
target     prot opt source               destination         
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU

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

Chain zone_wwan_forward (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             192.168.2.128       tcp dpt:37777
ACCEPT     udp  --  anywhere             192.168.2.128       udp dpt:37778
ACCEPT     udp  --  anywhere             192.168.2.128       udp dpt:554
ACCEPT     tcp  --  anywhere             192.168.2.128       tcp dpt:554
ACCEPT     udp  --  anywhere             192.168.2.67        udp dpt:22
ACCEPT     tcp  --  anywhere             192.168.2.67        tcp dpt:22
ACCEPT     udp  --  anywhere             192.168.2.1         udp dpt:8082
ACCEPT     tcp  --  anywhere             192.168.2.1         tcp dpt:8082
ACCEPT     udp  --  anywhere             192.168.2.128       udp dpt:8083
ACCEPT     tcp  --  anywhere             192.168.2.128       tcp dpt:8083
ACCEPT     udp  --  anywhere             192.168.2.1         udp dpt:2222
ACCEPT     tcp  --  anywhere             192.168.2.1         tcp dpt:2222
forwarding_wwan  all  --  anywhere             anywhere           
zone_wwan_REJECT  all  --  anywhere             anywhere           

Edytowany przez lukaz1987 dnia 01-09-2021 22:45
 
Przejdź do forum
Zaloguj
Wprowadź adres e-mail lub nazwę użytkownika

Hasło



Nie masz jeszcze konta? Zarejestruj się.

Zapomniałeś/aś hasła?
Aktualnie online
· Gości online: 68

· Użytkowników online: 0

· Łącznie użytkowników: 24,126
· Najnowszy użytkownik: goldi111
Czat
Musisz się zalogować, aby opublikować wiadomość.

servee
24-01-2025 18:18
Światłowód + mediakonwenter. Ekranowana skrętka nie jest wymagana, taką sytuację już zastałem. Zamierzam ją wymienić na zwykłą. Da to coś?

shibby
17-01-2025 07:45
a ta skrętka ekranowana o której piszesz to jakiś wkopany przewód do bramy/furtki/kamer
y zewn? Jak tak to jego też przez zabezpieczenie podepnij.

shibby
17-01-2025 07:43
no to pora zabezpieczyć kable LAN zabezpieczeniami przeciwprzepięciow
ymi - tanio nie będzie. Jak przychodzi ci internet? Skrętką czy światłem? Jak skrętką to zacząłbym od tego.

servee
12-01-2025 12:52
Ponownie padły mi wszystkie porty sieciowe w routerze - to już 3-ci w 6 m-cy. Podejrzany to ekranowana, nieuziemiona skrętka - 12mb. Czy jest to możliwe?

dawidt
21-12-2024 01:09
siema Grin

Maniek91PL
06-11-2024 22:37
dzięki !Grin

maxikaaz
29-10-2024 14:27
@Maniek91PL - Administration=> Admin Access, i tam masz "Allow Wireless Access" do zaznaczenia

Maniek91PL
26-10-2024 22:07
siemka! ktoś przypomni co się ustawiało jeśli nie mogę wejść od strony wifi do tomato? od lan działa

overflow2
04-10-2024 17:34
Kupowałem Asusy n10u albo n12d1 ale nie widzę ich, chyba już nie produkują, Chodzi o coś nowego i taniego. Transfery niewielkie.

maxikaaz
04-10-2024 09:38
@overflow2 patrząc po dostępności funkcji w nowych kompilacjach, to chyba nawet WRT54G/GL jeszcze ma OpenVPN, albo jakiś odpowiednik... zależy, na jakie transfery liczysz.

115,461,066 unikalnych wizyt