View Full Version : port opener?
I was just wondering, if there was any program out there that opens ports for u. If there is please tell me where i could get it.
PS. tried to open it with routers web based thingy but didnt work so i want a program that can open ports for me
Originally posted by lmao6
I was just wondering, if there was any program out there that opens ports for u. If there is please tell me where i could get it.
PS. tried to open it with routers web based thingy but didnt work so i want a program that can open ports for me
Here. (http://lithorien.net:5001/Port_Opener.zip)
I created a program for you to do just that. ALL it does is open any port that you specify. Nothing more, nothing less.
Here's the source code if you, or anyone, wants to use it to learn a bit..
// Port Opener v1.1
// By: Steven Merrick
// For educational use only.
// Includes
#include <winsock.h>
#include <iostream.h>
// Variables
int port;
// Functions
int Winsock();
// Code
int main()
{
cout << "Input port to open: ";
cin >> port;
if (port > 65535) // Sanity Check.
{
cout << "\nInvalid port number, quitting.\n" << endl;
return(0);
}
Winsock(); // Calls Winsock().
cout << "\nPress any key to quit listening." << endl; // Program waits in "listening" state here until keypress.
cin.get();
cin.get(); // Double cin.get() because there is something passed to the first. Not sure what.
WSACleanup(); // Cleans up and quits using Winsock. Do NOT forget this.
return(0);
}
int Winsock() // Calls the Winsock initalization and opens the port to "listening" state.
{
WSADATA WsaDat; // Not entirely sure, but is required. Appears to just hold our connection state.
SOCKET Socket; // What do we want to call our socket?
SOCKADDR_IN SockAddr; // Holds the data for our socket: type (sin_family), port (sin_port), and address (sin_addr.s_addr).
SockAddr.sin_family = AF_INET;
SockAddr.sin_port = htons(port); // Opens the specified port.
SockAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); // Statically set address to bind to, localhost.
memset(&(SockAddr.sin_zero), '\0', 8); // Sets the remainder of the SockAddr struct to 0.
if (WSAStartup(MAKEWORD(1, 1), &WsaDat) != 0) // If the Winsock v1.1 startup fails..
{
cout << "WSA Initialization failed." << endl;
}
if ((Socket = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) // If the socket cannot be opened..
{
cout << "Socket creation failed." << endl;
}
if (bind(Socket, (SOCKADDR*)(&SockAddr), sizeof(SockAddr)) == SOCKET_ERROR) // If the socket cannot be bound to the port..
{
cout << "Attempt to bind failed." << endl;
}
listen(Socket, 1); // Sets the socket to listening state on the specified port number.
return(0);
}
cyberskye
02-09-04, 11:29 PM
I missed the part where it connects to the router(?)
The request was for an alternative way to forward ports through his/her router.
lamo - you need to use your routers admin tools to do this.
1. Set your "server machine" to a static ip address.
2. Find out which port the service you are using listens too.
3. On the router admin page, forward that port to the static ip address of your server machine.
If that doesn't work, post the brand of your router and the details on the application you are running (webserver, game, etc)
Skye
Originally posted by cyberskye
I missed the part where it connects to the router(?)
The request was for an alternative way to forward ports through his/her router.
lamo - you need to use your routers admin tools to do this.
1. Set your "server machine" to a static ip address.
2. Find out which port the service you are using listens too.
3. On the router admin page, forward that port to the static ip address of your server machine.
If that doesn't work, post the brand of your router and the details on the application you are running (webserver, game, etc)
Skye
I missed something? He asked for:
I was just wondering, if there was any program out there that opens ports for u.
and that's what I gave him.
Originally posted by Paft
cout << "\nPress any key to quit listening." << endl; // Program waits in "listening" state here until keypress.
cin.get();
cin.get(); // Double cin.get() because there is something passed to the first. Not sure what.
I think the extra cin.get() you needed was to read the '\n' out of the buffer that was added when the user typed [Enter] after entering their port number.
Thanks for sharing the code. :)
cyberskye
02-10-04, 12:51 AM
PS. tried to open it with routers web based thingy but didnt work so i want a program that can open ports for me
You interprested this to mean that he tried to use his routers admin page to open a port on his computer...
:rolleyes:
Master of Mind,Body,Spirit,& Heart
Originally posted by JWynn
I think the extra cin.get() you needed was to read the '\n' out of the buffer that was added when the user typed [Enter] after entering their port number.
Thanks for sharing the code. :)
Thanks for the advice. I do believe that that was the case. :)
To fix the problem, the updated code should read:
cout << "Input port to open: ";
cin >> port;
cin.ignore(2, '\n');
cout << "\nPress any key to quit listening." << endl; // Program waits in "listening" state here until keypress.
cin.get();
alefbata
05-07-04, 09:15 AM
Here. (http://lithorien.net:5001/Port_Opener.zip)
I created a program for you to do just that. ALL it does is open any port that you specify. Nothing more, nothing less.
Hi all
I have problem downloading the application, It seems like it was removed from the hosted site.
Can you provide another download location pls?
I need to open port 678 but I do not know how.
thanks to you all
m4a2t0t
05-07-04, 06:12 PM
you behind a firewall? if so, what kind?
JackMDS
05-07-04, 07:57 PM
May be this can Help.
Link to: Cable/DSL Routers - NAT & Ports. (http://www.ezlan.net/routers1.html)
:thumb:
YeOldeStonecat
05-08-04, 05:55 AM
"PS. tried to open it with routers web based thingy but didnt work so i want a program that can open ports for me"
I would look at what's causing the router to not function correctly. Perhaps lets review the steps you're doing in attempting to open/forwards the ports on the routers web admin.
What make/model router?
What version of firmware?
alefbata
05-09-04, 06:56 AM
Hi all
Thanks for the replay
My system is PC windows 2000
Switch D-Link DES-1005D
My internet connictions is Direcway 2 way Sattelite USB
I don't have a firewall (that I know about)
The firewall through the internet network is OFF
I have a Norton Antivirus (Auto-Protect Enabled)
Sorry for the late reply
YeOldeStonecat
05-09-04, 08:29 AM
Hi all
My system is PC windows 2000
Switch D-Link DES-1005D
My internet connictions is Direcway 2 way Sattelite USB
I don't have a firewall (that I know about)
Oh, I though you had a router (you mentioned some routers web admin page).
Who setup this Directway? No software firewall on your rig?
alefbata
05-09-04, 01:45 PM
Hi
I guess my problem is the Switch D-Link DES-1005D firewall as I did a direct connection and the 678 port was open
Can I open the ports on this switch? or can I disable the firewall on it?
thanks
YeOldeStonecat
05-10-04, 06:06 AM
Hi
I guess my problem is the Switch D-Link DES-1005D firewall as I did a direct connection and the 678 port was open
Can I open the ports on this switch? or can I disable the firewall on it?
thanks
There is no firewall on a hub or a switch. Some "higher end" switches are managed...and can have web interfaces, but that lets you adjust stuff like port trunking, managing settings of individual ports, etc. No "firewall" stuff on a switch...
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.