Setting up port forwarding

Hi, I am working with a client and server UDP setup, but i’m not sure what I need to setup for port forwarding on my router, what part of the 2 do I need to do, or do I set up both? Not Sure what to put in for the port forwarding.

Example:
Application | Port from | Protocol | IP Address | Port to | Enable

Example of my code:

# Client program

from socket import *
import time

# Set the socket parameters
host = "75.134.61.245"
port = 21568
buf = 1024
addr = (host,port)

# Create socket
UDPSock = socket(AF_INET,SOCK_DGRAM)

def_msg = "===Enter message to send to server===";
print "\n",def_msg

# Send messages
while (1):
	data = raw_input('>> ')
	if not data:
		break
	else:
		if(UDPSock.sendto(data,addr)):
			print "Sending message '",data,"'....."
                f = open("myfile.txt", 'r+')
                for l in f:
                            l + "\n"
                msg = "sent: " + time.ctime() + ": " + data + "\n"
                f.write(msg)
                f.close()

hmmm… not really a Panda-Problem but anyway :slight_smile:

You need to tell your router the following:

(note that the settings do have to be set at the pc running the server part of your application.

Applicaten should be a free name to use (e.g. “python server example”)
Port from (and Port to if you don’t want to get confused) “21568”
Protocol “UDP”
IP Address (put your IP in there you got from your router. You can find that out by going Start -> run -> cmd (+Enter) - type “ipconfig” (without the ") and hit enter again. You should see your IP among other information)
Enable… well… :stuck_out_tongue:

The manual of your router would be your friend too… mumbles something about ununderstandable about “rtfm” :wink:

Hope that helped.

Regards, Bigfoot29