Networking :: Using A Perl Script To Test For A Socket Listening On A UDP Port On A Remote Host?
Mar 10, 2011
is it possible using a perl script to test for a socket listening on a UDP port on a remote host ?I work in an environment where netcat is not allowed and from time to time I need to see if a UDP port is open on a remote host.
View 6 Replies
ADVERTISEMENT
Jun 26, 2011
I am learning network prgramming in linux in c,and try to build a server and in this server I want to bind the listening socket to a paricular Ip address and port.Bind function is showing error,I did not want to use wild card. Here is the code.
#include<stdio.h>
#include<sys/socket.h>
#include<strings.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<string.h>
[Code]...
View 2 Replies
View Related
Feb 11, 2009
I'm trying to connect with my server via telnet, but when i sent the command (telnet xxx.xxx.xxx.xxx Port) doesn't works and shows then follow error: Unable to connect to remote host: Connection refused, It happens with any port. Is strange but my telnet services works (telnet xxx.xxx.xxx.xxx), In addition, i tried with firewall enabled and disabled and the problem still happens. My centOS run on virtualbox.
View 3 Replies
View Related
Feb 12, 2009
I make an application on GNU/Linux which listening on a MULTICAST stream, so I open my unconnected socket, bind it on a MULTICAST address and a port, join the multicast group with the "setsockopt (IP_ADD_MEMBERSHIP)", then I receive datagram on my socket.
Now I've two different instances of the same application that run with their own MULTICAST address and port. And what I found strange is that, after a misconfiguration, I switch the ports, for example:
Emitting on 225.0.0.1/23451 and 225.0.0.2/23452
Receiving on 225.0.0.1/23452 and 225.0.0.2/23451
And my receiving part doesn't care about the MULTICAST address, it looks like the socket is listening on the port number only! I mean that the receiver [225.0.0.1/23452] take its datagrams from emitter [225.0.0.2/23452] and vice-versa!
View 2 Replies
View Related
Oct 2, 2010
I am running Ubuntu 64-bit and I have been trying to set up an ssh connection between the Ubuntu server and a Windows 7 client (using putty) and when I enter the command:
Code:
sudo netstat --inet -lpn | grep sshd
I get the following:
[code]....
View 3 Replies
View Related
Mar 7, 2011
Our requirement is not to use the default SSH port, So I have edited /etc/ssh/sshd_config file and changed the default port 22 to 2022, and I have restarted the sshd daemon. Now port 2022 is open in all servers however when I ssh to the remote hosts I cannot login directly. I have to use the below command to connect to the remote server, I don't want to provide SSH port number info while login to remote servers, How to achieve this.
ssh -p 2022 server02
View 1 Replies
View Related
Oct 21, 2010
VERY new to linux, erm but I have an issue that needs solving!I recently moved to university, where their network blocks sftp port 22, this means that I cannot connect to my FTP server which is running a version of linux.Now I've got this ftp server connected to a seedbox and it was created using the following walk through..Code:I have written this guide for a friend, but I though it would be useful for others as well.
There are several guides floating around, but I found that most always cock up in some way. This one is tried and tested to work on Debian Etch (on an OVH rps, but should apply to most servers).If there is a new stable release of rtorrent/libtorrent then I will update this guide to show you how to update it (without reinstalling the whole server).
At the bottom there are also instructions to install ftp access & some network monitoring software.Basically, I would really like someone to be able to construct the commands on how to change the listen port for sftp connection on linux or add another port to the list that Linux would use so that I could put in through putty.
View 2 Replies
View Related
Nov 20, 2009
Can we open TCP and UDP socket on same port number?
View 1 Replies
View Related
May 14, 2010
iSCSI Server, can I change the default port 3260 to other port ?
View 1 Replies
View Related
Apr 6, 2011
I edited "sshd_config" file and changed port 22 to a new port. After I restart ssh, it listens on port 22 and the new port. How can I disable SSH to listen on port 22? I'm using Debian.
View 6 Replies
View Related
Jul 26, 2010
If I open a raw SCTP socket, am I able to bind to a specific port? (I only want to see SCTP packets from a particular IP address AND port.) Or, any raw SCTP socket, regardless of port binding , will get all SCTP packets received by the OS from that IP address? The port doesn't matter and is ignored.
View 1 Replies
View Related
Nov 10, 2010
I'm trying to create a PF_PACKET socket and send a frame to another host, I know the destination's mac address and interface index, and I want to use my own protocol no., so I defined a PROTONO as 0x2323, here's the code of sender
Code:
#define MYPTNO 0x2323
int main(int argc, char **argv)
{
intsockfd;
//struct sockaddr_inservaddr;
struct sockaddr_ll servaddr, bindaddr;
[Code]...
View 1 Replies
View Related
Aug 7, 2010
When I use the following command:
ssh user@ssh_server -L 5500:localhost:5500 -p 22
everything works fine. I can log in, and local port forwarding is done. Otherwise when I use the command:
ssh user@ssh_server -R 5500:localhost:5500 -p 22
I get an error "remote port forwarding failed for listen port 5500". However when I try remote port forwarding in WinXP by use of putty there is no problem...
View 2 Replies
View Related
Mar 2, 2010
#server.pl
use IO::Socket;
$| = 1;
$socket = new IO::Socket::INET (
LocalHost => '10.100.207.13',
LocalPort => '5000',
code....
it displays the message "couldn't connect to the server". How can i connect to the remote machine using tcp socket?
View 3 Replies
View Related
Sep 16, 2010
I have a customer who is complaining that they can connect to prt y on IP x with telnet. They are seeing the following:
telnet x.x.x.x y
Trying x.x.x.x...
Connected to x.x.x.x.
Escape character is '^]'.
after some time the connection of course times out. Connection closed by foreign host. There is no telnet service running on this port so they cannot do anything, but they are complaining tht the fact that telnet "connects" is a security risk. I am having difficulty explaining why they are able to connect with telnet. I know it has to do with the socket layer API in Linux but I am having difficulty explaining this sufficiently. I also can't just say "this is the way linux works" to them. I am looking through "UNIX Network Programming" by W.
View 3 Replies
View Related
Dec 16, 2010
i want to open a cmd.exe of a remote machine in my own machine.. i am using c language. its just for educational purpose.
View 9 Replies
View Related
Jul 3, 2009
I have an x application I am trying to run under gnome. It assumes a fixed ip address and exclusive use of the eth0. I have run it under gnome on RHEL 5.3. I set the ip address and ifconfig confirms the correct address. When I run it I get "SocketConnect() error:
Resource temporarily unavailabele, port 8005. (on the terminal that I started it)
This is indicative that it has failed to make a connection to the outside world. One difference I notice between the non-working and the working is that, the error message seems to stop coming out on the fedora gnome, almost immediately, whereas on the other installations it will come out indefinitely until it connects. is virb0 interferring. What is different in the networking on fedora 11 then RHEL?
View 2 Replies
View Related
Apr 23, 2009
I'm working on testing some software, and I have a question. We have several files of binary data that we need to push through our application to test. It communicates via simple TCP sockets. Is there a way I can send this data to the socket from the command line? I tried doing something like this, but telnet never picked up the data.
View 5 Replies
View Related
Sep 25, 2009
When I do netstat -pantu it shows a dash where the pid would be. I have also checked lsof -i and see no pid associated with the port. How do I find what program is keeping the port open?
View 1 Replies
View Related
Aug 16, 2010
I am running vsftp on one of my systems and when trying to connect to it it errors out with this: vendion@Loki:~> ftp 192.168.1.100 Connected to 192.168.1.100. 500 OOPS: could not bind listening IPv6 socket
I have tried stopping the firewall and even disabling IPv6 nothing changed, any clues as to what is going on?
View 5 Replies
View Related
Jul 7, 2010
I know that ports are, by default, not filtered; they simply don't respond to requests if there are no services listening on the port. Well, running netstat -tulpn gives:
Code:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
[code]....
View 3 Replies
View Related
Dec 2, 2010
My Apache is not listening on port 8080. Hence i cant access my server manager [URL]
View 2 Replies
View Related
Jul 8, 2010
I have stuk up in big issue here , I just want to find the remote url in which it listens ?
I know the remote host and remote port number but i just want to which url the web application listen
For example : Host : 1.1.1.1 & port no : 8080
But i remember the url would be http://1.1.1.1/(something):8080
I want to find the complete url in which it listens ?
In nmap whether i can achive this or anyother tool ?
View 5 Replies
View Related
Mar 16, 2011
How can I find out which process is listening on a port on linux?
View 5 Replies
View Related
Jan 21, 2010
Is there a way to determine what program is listening to some port, TCP or UDP, in Linux?
View 4 Replies
View Related
Jul 11, 2010
update:
Code:
luke@media:~$ sudo service bind9 restart
* Stopping domain name service...
[code]....
View 4 Replies
View Related
Nov 9, 2009
I'm using iptables with modules ip_contrack_ftp to be able to use passive ftp. It works well as long as port 21 is being used as listening port. Is there any way to make it work when I configure my ftp server (vsftpd) to listen on an alternative port, lets say 21001 or something? The helper module only seems to be working properly with the standard port, so I was wondering whether there was a way to "tell it" that another port is being used? I mean, of course I make a rule in fw to allow traffic to the alternative port.
But once it's time to start passive connection, then the iptable module cannot handle it properly. I could solve the problem by making a range of passive ports in the ftp-server configuration and allow the incoming traffic to them, but then using helper modules doesn't make any sense. I just want to allow the traffic to the listening port and then want the ip_contrack_ftp module to take care of the rest. This is what I do today - but only port 21 seems to be working. Is there a way to do this with a non-standard ftp port?
View 5 Replies
View Related
Nov 15, 2010
Lets say i have two machines on public ips. If i get incoming traffic on machine #1 on port 55242 i would just like to forward it to machine #2 on port 35000.I would just like to use machine #1 same way as a dns server works. It just redirects the traffic and tells the client where to go.
View 6 Replies
View Related
Feb 19, 2010
I am running several servers with multiple LAN ports. Two of the machines can communicate via two separate subnets to control bandwidth issues.
Machine 1: 10.0.0.1 (w/ additional alias 12.0.0.1)
192.168.1.1
Machine 2: 10.0.0.2
192.168.1.2
I see three separate intermittent symptoms on the 10.0.0.0 network.
1) Both machines will cut off in the middle of the data transfer (rsync) if it takes too long.
2) Both machines will claim that the RSA key host has changed on the other...this will happen every few minutes.
3) Both machines will, at times, disallow login from the other...ssh prompts for password but will not accept the password.
Performing any operation between the same machines via the 192.168.1.0 subnet has no issue (as of yet).From what I can see, the routing tables are set correctly. Machines were exact clones of each other. Machine 2 is a recently rebuilt machine with a fresh suse11 distro install. Symptoms on Machine 2 appeared immediately. I had this exact setup but reversed ip addresses before Machine 2 burned out without issue. All networks but the 12.0.0.1 are internal and there hasn't been any indication of attack.At times, running ssh-keygen -R <ipaddress> will fix issues 1-3, other times only 1-2.
View 2 Replies
View Related
Feb 5, 2009
have fedora 10 and am having problems with ssh. For some reason I can't connect via a remote host to my ssh. Local network connections do work just fine. I have been looking for a log of what is going on but have not had luck seeing anything.Things I have tried:
-Modify hosts.allow to allow ssh to all
-generated rsa1 key identity tryed specifying that with the -i option on the guest computer
[code]...
View 1 Replies
View Related