LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2014, 12:00 PM   #1
nix84
Member
 
Registered: Apr 2014
Posts: 276

Rep: Reputation: Disabled
Testing communications via netcat


I have developed a shell script built around netcat (nc) to communicate on the internet via a single port. I am considering to attempt voip by expanding this but first I need to test what I have. I tried sending and receiving on the same port with 2 users on the same machine but as expected this doesn't work.
Since I have the single desktop, I would like to know if there is a neat 'nix trick whereby I could output on one port and send to a different port on the receiving machine (both being on the same machine. This seems unlikely as communications is taking place at light speed sans delay over an internet when fully developed.
I shut down my firewall and flushed it.
same story connection refused when using same port. Infact all ports won't allow send/receive on single port.
Any suggestions for testing and expanding this idea?

Last edited by nix84; 05-13-2014 at 12:51 PM.
 
Old 05-13-2014, 02:35 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,228

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
There should be no problem sending from one process (or thread) and receiving in another process on the same machine. That's what interface lo is for. What probably won't work is to try to do it in the same thread, since it will all hang up on the first blocking call.
 
Old 05-13-2014, 11:43 PM   #3
nix84
Member
 
Registered: Apr 2014
Posts: 276

Original Poster
Rep: Reputation: Disabled
I have confirmed what you and my research reading stated about using single port on single machine. I have yet to understand why shutting down my iptable firewall and flushing did not allow for making the link as I have now. I will contemplate that and close this posting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help w/ netlink communications rrlangly Linux - Kernel 1 04-07-2010 12:46 AM
Replace 'etch' with 'testing' in /etc/apt/sources.list to track 'testing' branch? Akhran Debian 3 04-09-2007 11:45 AM
VLANS communications metallica1973 Linux - Networking 6 09-10-2006 05:17 PM
Setup as getting debian testing files from ftp - will it stay with testing BrianHenderson Debian 2 09-02-2004 07:06 PM
serial communications flandercan Programming 4 02-13-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration