[Socket - c++] Problem z łaczeniem?

Witam (nie wiem który dział wybrać…(jeśli zły proszę o przeniesienie))

mam problem otóż pisze aplikacje klient|serwer i jest problem jeśli ktoś próbuje się połaczyć z zewnątrz

serwer:

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

using namespace std;


#define PORT 9533


int main(void)

{

int sock,newsock,sinsize,binder;

 struct sockaddr_in myaddr;

  struct sockaddr_in yaddr;

 sock = socket(AF_INET,SOCK_STREAM,0);


 myaddr.sin_family = AF_INET;

 myaddr.sin_port = htons(PORT);

 myaddr.sin_addr.s_addr = INADDR_ANY;

 memset(myaddr.sin_zero,0,sizeof(struct sockaddr));


 if((binder = bind(sock,(struct sockaddr*)&myaddr,sizeof(struct sockaddr))) < 0)

 {

 perror("bind");

 exit(1);

 }


 listen(sock,5);


 sinsize = sizeof(struct sockaddr);


 if((newsock = accept(sock,(struct sockaddr*)&yaddr,(socklen_t*)&sinsize)) < 0)

 {

 perror("accept");

 exit(1);

 }

 cout << "\n\t\tPOLACZONY\n\n";

 cout << "IP: " << inet_ntoa(yaddr.sin_addr);


   close(sock); close(newsock); close(binder);

 cout << "\n\n";

return 0;

}

klient

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

using namespace std;


void error(char *msg);


#define PORT 9533


int main(void)

{

 int sock,con;

  sock = socket(AF_INET,SOCK_STREAM,0);

  struct sockaddr_in yaddr;

  yaddr.sin_family = AF_INET;

  yaddr.sin_port = htons(PORT);

  yaddr.sin_addr.s_addr = inet_addr("83 ****");

  memset(&yaddr.sin_zero,0,sizeof(struct sockaddr));


  if((con = connect(sock,(struct sockaddr*)&yaddr,sizeof(struct sockaddr))) < 0)

  { error("connect"); }


	close(sock);

return 0;

}


void error(char *msg){

perror(msg);

exit(1);

}

o to wyniki z skanu nmapa dla lokalhosta

PORT STATE SERVICE

9533/tcp open unknown

zewnętrzne(83…):

PORT STATE SERVICE

9533/tcp filtered unknown

i daje w iptablesie:

iptables -A INPUT -p tcp -s 0/0 --dport 9533 -j ACCEPT

i http://img510.imageshack.us/img510/6896 … anusd5.png