Nowe posty

Autor Wątek: Problem z lan-em i portami  (Przeczytany 1564 razy)

jaras2678

  • Gość
Problem z lan-em i portami
« dnia: 2009-10-27, 11:01:17 »
Problem:
mam przekierowany port 3399 z iterfejsu wan0 na lan0 na 192.168.9.100:3399
na router wskazuje domena xyz.pl

i wszystko jest pieknie jezeli lacze sie z domena xyz.pl:3399 z sieci zewnetrznej porty ladnie przekierowuje Very Happy jest bajka

ale kiedy lacze sie z sieci lokalnej (lan0) z domeny xyz.pl:3399 to otrzymuje "server connection refused"

ale jesli lacze sie z sieci lokalnej (lan0) z 192.168.9.100:3399 to dziala pieknie.

localhost ~ # iptables  -v -L -t nat
Chain PREROUTING (policy ACCEPT 175K packets, 15M bytes)
 pkts bytes target     prot opt in     out     source               destination        
   24  1440 DNAT       tcp  --  any    any     anywhere             xxxx.internetdsl.tpnet.pl tcp dpt:3399 to:192.168.9.100:3399

Chain POSTROUTING (policy ACCEPT 1118 packets, 91904 bytes)
 pkts bytes target     prot opt in     out     source               destination        
58878 4407K MASQUERADE  all  --  any    wan0    anywhere             anywhere          

Chain OUTPUT (policy ACCEPT 14227 packets, 1055K bytes)
 pkts bytes target     prot opt in     out     source               destination        
    0     0 DNAT       tcp  --  any    any     anywhere             xxxx.internetdsl.tpnet.pl tcp dpt:3399 to:192.168.9.100:3399

localhost ~ # iptables  -v -L        
Chain INPUT (policy ACCEPT 238K packets, 24M bytes)
 pkts bytes target     prot opt in     out     source               destination        

Chain FORWARD (policy ACCEPT 1069 packets, 67325 bytes)
 pkts bytes target     prot opt in     out     source               destination        
3369K 1283M ACCEPT     all  --  lan0   any     192.168.0.0/16       anywhere          
3773K 2810M ACCEPT     all  --  wan0   any     anywhere             192.168.0.0/16    

Chain OUTPUT (policy ACCEPT 242K packets, 57M bytes)
 pkts bytes target     prot opt in     out     source               destination


wyinik dzialania nmap-a w sieci lokalnej

possible@Linux:~$ nmap -p 3399 192.168.9.100

Starting Nmap 4.76 ( http://nmap.org ) at 2009-10-27 10:50 CET
Interesting ports on 192.168.9.100:
PORT     STATE SERVICE
3399/tcp open  sapeps

Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds


possible@Linux:~$ nmap -p 3399 xyz.pl

Starting Nmap 4.76 ( http://nmap.org ) at 2009-10-27 10:51 CET
Interesting ports on xxxx.internetdsl.tpnet.pl (IP_ZEW):
PORT     STATE    SERVICE
3399/tcp filtered sapeps

Nmap done: 1 IP address (1 host up) scanned in 0.42 seconds

problem dotyczy kazdego portu jakiego bym nie przekierowywal
POZDRAWIAM