Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2012, 02:09 AM
result result is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default PF firewall setting for network programming
Network programming newb.....just playing around with some code I found online.
The port that the program is listening on is 3490, in the PF firewall manager, what service should be selected with port 3490 to ensure proper communication during a telnet session?
Should I setup telnet for outgoing and incoming via port 3490?

Below is the pic of my firewall manager



I'm using emacs, if that helps
Reply With Quote
  #2  
Old 04-13-2012, 12:07 PM
drulavigne drulavigne is offline
Administrator
 
Join Date: Nov 2009
Posts: 1,133
Thanks: 46
Thanked 55 Times in 53 Posts
Default
Are you just telnetting to the port? If so, you only need to open port 3490 and issue the port number to the telnet command:

telnet IP 3490

If the service you are connecting to creates a back connection, you will need to create an incoming rule for the port(s) it uses for that connection.
Reply With Quote
  #3  
Old 04-13-2012, 04:24 PM
result result is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
thanks for the reply.

I'm using putty to telnet to IP address and port 3490.
So in PF firewall, there should be an entry of the following:

telnet - incoming - 3490
telnet - outgoing - 3490

If this is what you are suggesting, I have tried this. That's the "Unknown" service entry in the picture I attached. It changes from telnet to unknown after awhile

What would happen is, telnet session will connect, but I cannot communicate during session.

I don't see the customized welcome message for each new accepted connection that is in the program

I type in the telnet window, but the program don't receive the message

If I do netstat -a, I see the Recv-Q with bytes of pending data, but Send-Q is empty

I executed different programming projects, from different websites, but same results. So I assume that my firewall settings are to blame
Reply With Quote
  #4  
Old 04-14-2012, 11:43 AM
drulavigne drulavigne is offline
Administrator
 
Join Date: Nov 2009
Posts: 1,133
Thanks: 46
Thanked 55 Times in 53 Posts
Default
If you temporarily disable the firewall does the problem disappear? If so, it is a problem with the firewall rule. Double-check that the application does not need to connect back on a port to the PC-BSD system.

Also, I've never used putty to telnet so I am not sure if it operates the same as command line telnet. Have you successfully used putty to telnet to a service before? (If so, ignore this last statement)

Last edited by drulavigne; 04-14-2012 at 11:46 AM.
Reply With Quote
  #5  
Old 04-14-2012, 06:23 PM
result result is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
I originally disabled the firewall and the same result

I'm able to ssh via putty, which gives a prompt for login credentials

this is very strange
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:27 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.