| 
 Przekierowanie portów na router 
 | 
| j4zon3k | 
 Dodano 12-01-2013 19:33 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
Jeśli to banał - przepraszam, ja walczę już cały dzień i mam dosyć :o szukałem po necie (może słabo) ale nie potrafię tego ogranać  
mam zainstalowany tomato-NDUSB-1.28.5x-104-PL-Nocat-VPN z tomato.groov.pl 
odpaliłem sobie na nim oscama 1.20 7180 i wszystko lata OK tylko nie akceptuje połączeń z zewnątrz. Wiem, że muszę przekierować porty z zewnątrz bezpośrednio na router. Dodałem w zakładce PRZEKIEROWANIE PORTÓW->Podstawowe przekierowanie UDP i TCP na 192.168.1.1 lecz nie rozwiązuje to problemu, połączenia z zewnątrz nadal nie są akceptowane. 
 
Proszę o jakąś podpowiedź. Może problem jest banalny ale dla mnie nie do ogranięcia 
 
 
znalazłem coś takiego: 
 
                    iptables -t nat -A PREROUTING -p tcp -m tcp --dport 5858 -j DNAT --to-destination 192.168.1.1:5858 
iptables -A INPUT -p tcp -m tcp -d 192.168.1.1 --dport 5858 -j ACCEPT 
 
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8035 -j DNAT --to-destination 192.168.1.1:8035 
iptables -A INPUT -p tcp -m tcp -d 192.168.1.1 --dport 8035 -j ACCEPT  
 
ale to także nie działa 
 
ps. testowałem na gboxie i mam to samo :( brak odpowiedzi na portach zewnętrznych
 
Edytowany przez j4zon3k dnia 12-01-2013 19:45
 | 
|   | 
 
 
 
 | 
 | 
| labik | 
 Dodano 12-01-2013 19:52 
 | 
 
  
Power User 
 
 
  
Posty: 387 
Dołączył: 16/09/2011 08:08 
  | 
Administration => script => firewall dodaj : 
 
                    iptables -A INPUT -p tcp --dport [color=#ff0000]nrportu[/color] -j ACCEPT    
 
i powinno zadziałać.
 Asus TUF AX5400 
Asus RT-AC68U 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 12-01-2013 20:15 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
próbowałem tak: 
 
                    iptables -A INPUT -p tcp --dport 5858 -j ACCEPT #share5858 
iptables -A INPUT -p tcp --dport 8035 -j ACCEPT #share8035 
iptables -A INPUT -p tcp --dport 8030 -j ACCEPT #share8030 
iptables -A INPUT -p udp --dport 5858 -j ACCEPT #share5858u 
iptables -A INPUT -p udp --dport 8035 -j ACCEPT #share8035u 
iptables -A INPUT -p udp --dport 8030 -j ACCEPT #share8030u  
 
niestety efekt zerowy - qrcze nie mam pojęcia czemu to nie lata. Jeśli odpalę na routerku podłączonym do innego (jako server dedykowany) to wtedy wszystko działa. | 
|   | 
 
 
 
 | 
 | 
| labik | 
 Dodano 12-01-2013 20:23 
 | 
 
  
Power User 
 
 
  
Posty: 387 
Dołączył: 16/09/2011 08:08 
  | 
Ale to powinno działać . Skoro oscam chodzi na routerze to wystarczy tylko otworzyć mu port z zewnątrz.Żadnych innych przekierowań nie rób.
 Asus TUF AX5400 
Asus RT-AC68U 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 12-01-2013 20:34 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
Czyli w PRZEKIEROWANIE PORTÓW->Podstawowe nie dodaje dodatkowo reguł? 
 
Pewnie coś sknociłem jeszcze - nic powalczę dalej, sprawdzę na innych wersjach oscama | 
|   | 
 
 
 
 | 
 | 
| labik | 
 Dodano 12-01-2013 20:44 
 | 
 
  
Power User 
 
 
  
Posty: 387 
Dołączył: 16/09/2011 08:08 
  | 
Nic nie przekierowujesz.Otwierasz tylko port w/w regułami.
 Asus TUF AX5400 
Asus RT-AC68U 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 10:54 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
nie mam już pomysłu - nie działa :@ 
 
iptables wygląda tak: 
 
                    Chain INPUT (policy DROP) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere            state INVALID  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
shlimit    tcp  --  anywhere             anywhere            tcp dpt:ssh state NEW  
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
 
Chain FORWARD (policy DROP) 
target     prot opt source               destination          
           all  --  anywhere             anywhere            account: network/netmask: 192.168.1.0/255.255.255.0 name: lan  
ACCEPT     all  --  anywhere             anywhere             
DROP       all  --  anywhere             anywhere            state INVALID  
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU  
restrict   all  --  anywhere             anywhere             
monitor    all  --  anywhere             anywhere            source IP range 192.168.1.2-192.168.1.51  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
wanin      all  --  anywhere             anywhere             
wanout     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
 
Chain OUTPUT (policy ACCEPT) 
target     prot opt source               destination          
 
Chain monitor (1 references) 
target     prot opt source               destination          
RETURN     tcp  --  anywhere             anywhere            WEBMON --max_domains 300 --max_searches 300  
 
Chain rdev01 (1 references) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere            MAC 7C:ED:8D:98:0F:4C  
 
Chain restrict (1 references) 
target     prot opt source               destination          
rdev01     all  --  anywhere             anywhere             
 
Chain shlimit (1 references) 
target     prot opt source               destination          
           all  --  anywhere             anywhere            recent: SET name: shlimit side: source  
DROP       all  --  anywhere             anywhere            recent: UPDATE seconds: 60 hit_count: 4 name: shlimit side: source  
 
Chain wanin (1 references) 
target     prot opt source               destination          
 
Chain wanout (1 references) 
target     prot opt source               destination           
 
Może tu jest jakiś babolek. Przegooglowałem, już wszystko i naprawdę ręce mi opadają :o
 
Edytowany przez j4zon3k dnia 13-01-2013 13:57
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 11:17 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
teraz to wygląda tak: 
 
 
                    Chain INPUT (policy DROP) 
target     prot opt source               destination          
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
DROP       all  --  anywhere             anywhere            state INVALID  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
shlimit    tcp  --  anywhere             anywhere            tcp dpt:ssh state NEW  
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
 
Chain FORWARD (policy DROP) 
target     prot opt source               destination          
           all  --  anywhere             anywhere            account: network/netmask: 192.168.1.0/255.255.255.0 name: lan  
ACCEPT     all  --  anywhere             anywhere             
DROP       all  --  anywhere             anywhere            state INVALID  
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU  
restrict   all  --  anywhere             anywhere             
monitor    all  --  anywhere             anywhere            source IP range 192.168.1.2-192.168.1.51  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
wanin      all  --  anywhere             anywhere             
wanout     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
 
Chain OUTPUT (policy ACCEPT) 
target     prot opt source               destination          
 
Chain monitor (1 references) 
target     prot opt source               destination          
RETURN     tcp  --  anywhere             anywhere            WEBMON --max_domains 300 --max_searches 300  
 
Chain rdev01 (1 references) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere            MAC 7C:ED:8D:98:0F:4C  
 
Chain restrict (1 references) 
target     prot opt source               destination          
rdev01     all  --  anywhere             anywhere             
 
Chain shlimit (1 references) 
target     prot opt source               destination          
           all  --  anywhere             anywhere            recent: SET name: shlimit side: source  
DROP       all  --  anywhere             anywhere            recent: UPDATE seconds: 60 hit_count: 4 name: shlimit side: source  
 
Chain wanin (1 references) 
target     prot opt source               destination          
 
Chain wanout (1 references) 
target     prot opt source               destination           
 
niestety efekt ten sam - normalnie chyba jestem jakiś wybrany :( 
w skryptach nic nie kombinowałem - zainstalowałem 'czyste' tomato i tylko walczę z tymi portami 
 
w ZAAWANSOWANE->Routing->Tryb Pracy ma być ustawione gateway czy router?
 
Edytowany przez j4zon3k dnia 13-01-2013 11:33
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 11:39 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
ADMINISTRACJA->Srypty->Firewall 
 
wpisy są na samym początku Chain INPUT (policy DROP) 
 
może znaczenie ma, że połączony jestem do modemu w trybie PPPoE (netia) gdzie całością zarządza router 
 
 
 
Edytowany przez j4zon3k dnia 13-01-2013 12:24
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 12:41 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Pokaż zawartość pliku: 
/etc/iptables
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 12:54 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
tak jak pisałem wcześniej advanced-routing mam ustawiony na Gateway ale widzę, że tak być powinno przy PPPoE 
 
 
                    Miscellaneous 
Mode: Options available are Gateway and Router. 
Gateway = Don't let WAN traffic access the LAN, except through port forwarding or DMZ. (Required mode for PPPoE connections connected through WAN port to a bridged ADSL modem.) 
Router (Default) = Turn off these features and NAT. (May be incorrect on details, but this is the idea)  
 
/etc/iptables 
 
 
                    *mangle 
:PREROUTING ACCEPT [0:0] 
:OUTPUT ACCEPT [0:0] 
COMMIT 
*nat 
:PREROUTING ACCEPT [0:0] 
:POSTROUTING ACCEPT [0:0] 
:OUTPUT ACCEPT [0:0] 
:WANPREROUTING - [0:0] 
-A PREROUTING -d 87.204.222.203 -j WANPREROUTING 
-A PREROUTING -i ppp0 -d 192.168.1.1/255.255.255.0 -j DROP 
-A WANPREROUTING -p icmp -j DNAT --to-destination 192.168.1.1 
-A POSTROUTING  -o ppp0 -j MASQUERADE 
-A POSTROUTING -o br0 -s 192.168.1.1/255.255.255.0 -d 192.168.1.1/255.255.255.0 -j SNAT --to-source 192.168.1.1 
COMMIT 
*filter 
:INPUT DROP [0:0] 
:OUTPUT ACCEPT [0:0] 
-A INPUT -m state --state INVALID -j DROP 
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-N shlimit 
-A shlimit -m recent --set --name shlimit 
-A shlimit -m recent --update --hitcount 4 --seconds 60 --name shlimit -j DROP 
-A INPUT -p tcp --dport 22 -m state --state NEW -j shlimit 
-A INPUT -i lo -j ACCEPT 
-A INPUT -i br0 -j ACCEPT 
:FORWARD DROP [0:0] 
-A FORWARD -m account --aaddr 192.168.1.0/255.255.255.0 --aname lan 
-A FORWARD -i br0 -o br0 -j ACCEPT 
-A FORWARD -m state --state INVALID -j DROP 
-A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 
:restrict - [0:0] 
-A FORWARD -o ppp0 -j restrict 
:rres01 - [0:0] 
-X rres01 
:rdev01 - [0:0] 
-A rdev01 -m mac --mac-source 7C:ED:8D:98:0F:4C -j DROP 
:monitor - [0:0] 
-A FORWARD -o ppp0 -m iprange --src-range 192.168.1.2-192.168.1.51 -j monitor 
-A monitor -p tcp -m webmon --max_domains 300 --max_searches 300 --domain_load_file /var/webmon/domain --search_load_file /var/webmon/search -j RETURN 
:wanin - [0:0] 
:wanout - [0:0] 
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A FORWARD -i ppp0 -j wanin 
-A FORWARD -o ppp0 -j wanout 
-A FORWARD -i br0 -j ACCEPT 
COMMIT   
 
Edytowany przez j4zon3k dnia 13-01-2013 13:28
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 13:29 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Nie widać nigdzie śladów otwarcia portów na routerze.  
Netia - masz skonfigurowany DDNS bo domyślam się, że masz Dynamiczni IP od netii??. 
 
po wpisaniu w Firewall: 
iptables -A INPUT -p tcp --dport 5858 -j ACCEPT 
 
powinieneś mieć taki wpis po wydaniu polecenia iptebles -L: 
 
Chain INPUT (policy DROP) 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858 
. 
. 
. 
 
Może wpisz to z palca w konsole i zobacz czy przyjmie i czy zobaczysz ją poprzez iptables -L 
 
Czyściłeś NVRAM po wgraniu Tomato??
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 13:33 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
iptables -L 
 
 
                     
Chain INPUT (policy DROP) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere            state INVALID  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
shlimit    tcp  --  anywhere             anywhere            tcp dpt:ssh state NEW  
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
ACCEPT     udp --  anywhere             anywhere            tcp dpt:5858  
ACCEPT     udp --  anywhere             anywhere            tcp dpt:8030  
  
 
jest tak - we wcześniejszych postach są załączone pełne logi 
 
 
NVRAM czyściłem, ale może coś już namieszałem - tyle tych zmian
 
Edytowany przez j4zon3k dnia 13-01-2013 13:38
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 13:36 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Pokaż zakładkę Tomato przekierowanie portów, DZM, Zainicjowane.
 
Edytowany przez hermes-80 dnia 13-01-2013 13:42
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 13:42 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
teraz jest tak: 
 
                    Chain INPUT (policy DROP) 
target     prot opt source               destination          
ACCEPT     udp  --  anywhere             anywhere            udp dpt:8030  
ACCEPT     udp  --  anywhere             anywhere            udp dpt:5858  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8030  
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5858  
DROP       all  --  anywhere             anywhere            state INVALID  
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED  
shlimit    tcp  --  anywhere             anywhere            tcp dpt:ssh state NEW  
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             
 
Chain FORWARD (policy DROP)  
 
dodane do firewalla 
 
                    iptables -I INPUT -p tcp --dport 5858 -j ACCEPT 
iptables -I INPUT -p tcp --dport 8030 -j ACCEPT 
iptables -I INPUT -p udp --dport 5858 -j ACCEPT 
iptables -I INPUT -p udp --dport 8030 -j ACCEPT  
 
niestety brak dostępu do routera przez ustawione porty 
 
  
 
 
 
Edytowany przez j4zon3k dnia 13-01-2013 13:47
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 13:47 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Pokaż zakładki i za pomocą tej strony: http://www.t1shopper.com/tools/port-s...port-scan/ sprawdź otwarcie portów (co się wyświetla) jeśli usługa nasłuc****e na nich. 
 
Usuń to przekierowanie portów z GUI.
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 13:52 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
 
                    Scanning ports on 87.204.222.203 
 
87.204.222.203 isn't responding on port 5858 (). 
87.204.222.203 isn't responding on port 8030 ().  
 
przekierowanie inicjowanych portów jest nieaktywne - ten wpis jest wyłączony
 
Edytowany przez j4zon3k dnia 13-01-2013 13:55
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 13:55 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Modem ci czasem nie blokuje portów - masz go chyba w bridgu ale czort wie?? 
 
Odłącz router - skonfiguruj PPPoE bespośrednio na PC, wyłącz Firewall ,odpal http://www.elektroda.pl/rtvforum/down...?id=406860 na badanym porcie i sprawdź otwartość portu stroną podana wyżej.
 
Edytowany przez hermes-80 dnia 13-01-2013 13:59
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 | 
 | 
| j4zon3k | 
 Dodano 13-01-2013 13:56 
 | 
 
  
User 
 
 
  
Posty: 20 
Dołączył: 12/01/2013 19:25 
  | 
jak odpalę server na kompie czy tunerku to jest OK, przekierowanie z poziomu routera działa - tylko jak bezpośrednio na nim to mam zonka :( 
 
 
                    Scanning ports on 87.204.222.203 
 
87.204.222.203 is responding on port 5858 (). 
 
87.204.222.203 isn't responding on port 8030 ().  
 
tak wygląda po odpaleniu serverka na kompie
 
Edytowany przez j4zon3k dnia 13-01-2013 14:06
 | 
|   | 
 
 
 
 | 
 | 
| hermes-80 | 
 Dodano 13-01-2013 14:03 
 | 
 
  
VIP 
 
 
  
Posty: 3682 
Dołączył: 21/04/2009 11:24 
  | 
Zmien Tomato na 102 u mnie na tym działa może ma jakiś BUG
 =============================================================== 
Netgear WNR3500L v1 
Podziękowania dla administracji Openlinksys.info! 
 | 
|   | 
 
 
 
 |