General :: Forward Sound Over The Network Using Netcat?
Mar 6, 2011
I've always been curious about this but say that you had computer A which runs headless and had music that you wanted to hear from computer B. Sure you can setup vlc or icecast on computer A and stream it. But what if you could forward the sound over netcat. For example, say when you play a sound file on Computer A data gets sent to /dev/snd.Would be possible to do something like the following.
Computer B
nc -lvp 6666 > /dev/snd
Computer A
cat /dev/snd | nc -v -w 5 computer_b 6666
And be able to hear sound playing on Computer A? point me in the right direction to find out about how to do this?
Ultimately my DB will run in VM2 and any DB requests coming in at 2055 of VM1 should be forwarded to port 2055 of VM2. Since I do not yet have a DB running I am trying to test with netcat.
I'm using something like this to send file from one computer to another:To serve file (on computer A):
cat something.zip | nc -l -p 1234 To receive file (on computer B): netcat server.ip.here. 1234 > something.zip can I do the opposite? Let's say I have file on computer B and I want to send it to A but not the way I wrote above, but by making computer that's supposed to receive file (A) be 'listening' server and connect computer that's 'sending' file (B) to server and send the file? Is it possible? I think it might be but I'm not sure how to do this.
In case my above explanation is messed up: How do I send file TO 'server' instead of serving the file on server and then taking it FROM it (like I did above)?
i have to control vlc which is running on my pc through console application.I heared like it can be controlled using netcat and rc interface but not getting the procedures how exactly its can be implemented.So if anyone knows pls explain me with steps.i want to do this in windows and i'm using vlc version 0.8.6.
eth0: 192.168.0.0/24 - local lan A eth1: 200.1.2.3 - internet link - default route eth2: 192.168.10.0/24 - local lan B eth3: 192.168.20.0/24 - local lan C Lan A - Default routing to eth0 Lan B - Default routing to eth2 Lan c - Default routing to another server but the workstations has static routing to this server too.
Everything is working fine on Opensuse 11.1 until I upgrade this sever to Opensuse 11.2 ( Reinstall, not update at all ). After upgrade to 11.2 the routing across local lan interfaces simply not work, if you try to ping lan-to-lan you got the message: Network unreachable, even with the IP Forward enable, but the default route is working fine trough the SNAT.
I've come back to Opensuse 11.1 and everything become normal, does anyone have an problem like this? Maybe a bug? PS: I do not try to disable the AppArmor, next weekend I will try Opensuse 11.2 without the AppArmor and post here anyway.
I tried Ubuntu Network version on a USB stick on my Netbook Samsung NF210 with 2GB RAM but this does not seem to be a viable way forward to me. Ubuntu on USB stick seems very slow to load. When resuming seemed to throw up errors. Resuming from Windows takes 3 seconds. I am reluctant to dual boot my netbook with Ubuntu after my experiences with my spare laptop. Is there a safe way to install Ubuntu on a netbook to dual boot with Windows Starter? how I get Ubuntu to work with a 'Three' Mobile dongle?
I have two custom scripts I just wrote to facilitate transferring files between my VPS and my home server. They are both written in bash (short & sweet): To send:
[Code]....
The problem is that, for a very quick second, I see something flash along the lines of "Connection Refused" (before pv overwrites it), and no file is ever transferred. The port is forwarded through my router, and nmap confirms it:
I'm wondering if I can use netcat to listen to a UDP port and display ALL incoming packets, no matter where they're from. If I just do 'nc -u -l 1234' then netcat will listen for incoming packets and connect() to the source address of the first one it sees (I can see this with strace). Is there any (standard) way to stop the connect() call? I can make a hack to block connect() with a function of my own, but that'd be ugly
I have two IP address on my iMac I want to "bridge". I'm not sure what the proper terminology is... here's the situation.
My iMac has a firewire connection to my laptop and an ethernet connection to the rest of my office. My laptop has an ip of 192.168.100.2 (on the firewire interface). My iMac has an IP of 192.168.100.1 on the firewire interface, and two IPs, 10.1.0.6 and 10.1.0.7, on it's ethernet interface.
If I wanted to forward all traffic coming in from 192.168.100.2 on my OS X machine to go out on IP 10.1.0.7, and vice-versa, can this be done? I assume I would use the ipfw command.
Essentially I want to "bridge" the firewire network to the ethernet network so my laptop can see all the machines on the 10.1 network, and all those machines can see my laptop at 10.1.0.7. Is this possible?
I am trying to do a NAT forward in iptables but get the following error:Quote:[root@server88-xxx-xxx-198 openvpn]# iptables -t nat -I POSTROUTING -i tun0 -o eiptables v1.3.5: Can't use -i with POSTROUTINGAny ideas on what to do?I have an OpenVON server running and I need the client to use the ports on the OpenVPN server
I connected two machines, I have their given of the addresses ip in a static way and not with DHCP. I gave to the machine server the address: 192.168.0.1, and in the machine client the address 192.168.0.2.
i'm trying to clone a hard drive using dd & netcat.
Quote:
on target: nc -l -p 1333 |dd of=/dev/sdb on source: dd if=/dev/sdb |nc 192.168.0.5 1333
However after a while since the process was initiated I get a
I/O error in filesystem ("....") meta-data dev ...block 0x..... ("xfs_read_buf") error 5 buf count 512 XFS: size check 2 failed
Further digging showed that the target hard drive was less in space by 100 kb. Both are 1 T drives seagte but different models, hence the diff in space maybe.The data on the original drive is only 900 GB.
I've tried to use netcat in the past and assumed it was my stupidity that was preventing it from working... but this is getting ridiculous. I'll execute nc -l 3333 on a server at 192.168.0.105 (after opening it on the firewall of course) then I run nc 192.168.0.105 3333 on my laptop (from 192.168.0.101). and nothing happens... i start typing and nothing comes up on the terminal.
I run nc -z 192.168.0.105 80 which should ideally do a port scan of port 80 on that server (of which I'm running a web server that clearly works) but it doesnt even give me any feedback. Nothing happens. Now when I use the verbose flag i see that I am indeed connecting to the specified port on the server successfully (so the port scan one is a success but only with the verbose flag... which shouldnt be the case I believe). But still once I have the server listening and the laptop connected... I type in both windows and nothing happens...
Here is my problems :I have two networks :1. LAN (10.1.x.x subnet 255.255.0.0), and2. my internet public (IP 202.xx.xxx.xxxx subnet 255.255.255.240)I have an application in my LAN PC (10.1.2.240) which broadcast udp packet to its client. The client in my LAN can receive the udp packet, no problem.My question is how netcat/socat can RELAY the udp broadcast packet to one of my IP public address so the message can be received by other client from internet ?
i have 3 servers in 2 dcs as follows; server 1 (dc1 - dmz) --- server 2 (dc1 - internal) --- server 3 (dc2 - internal) Now I have an application in server1 that have to connect to port 44000 in server 3 but dc refuse to open connection saying they do not open connections between dmz and dc2 (i have no say over this).
However I can connect to virtually any port from server1 <-> server2 and also server2 <-> server3. Is it possible to do something like;
server1 <-> server2 <-> server3:44000 using nc to get the app work.
The problem Im facing is that I cant seem to intercept the data going between the client and the server. I want to be able to have the data coming to the server in a variable, manipulate it and send it to the client, and the other way, have the data coming to the client in a variable, manipulate it and send it to the server.
Im running on an embedded device where tee, awk and many other commands are absent. how can I redirect the data to a variable, manipulate it and pass it to the other side, that is the question.
I am running somes instances of Redis. I want to get Redis stats with following command:
Code:
$ echo "info" | nc <server_IP> <port>
but sometime it returns nothing. The first thing come to my mind is broken pipe or something like this. I always get the result if telnet to Redis and typing 'info' command. I also try pipe viewer to monitor the progress of data but it didn't help:
I have a computer with a BSD subsystem that is acting as a router to other Windows computers.
On one of my Windows, I have an Apache Web Server that I want people to access from the outside world.
So, I have created an ipfw rule in my router computer that goes like this: ipfw add 100 fwd 10.0.2.2 ip from any to any dst-port 2443
Thing is, nothing happens.
I've tried changing the ServerName in my Apache to match my IP address (which is the destination IP of the incoming packets, I imagine) but still, nothing.
My company is changing it's mail subdomain...Example: [URL]. I wanted to build a sendmail box up to handle this until all the sending parties get the new address. I'm sure it's in the rewrite hearder part of sendmail.cf but I just don't understand how to doit.
We are currently having a windows virus outbreak in our corporate network, all the it guys using windows machines and they are infected of course.
My question is I have a internet enabled ubuntu 9.10 machine with two nics.
eth0 is for internet and I wanna distribute my internet connection from my other nic.
There are alotta switches and access points in our network but i placed my ubuntu desktop just like the infected windows machine. Everything seems working except other clients internet connections.
So I opened a terminal and fired up netcat.I only wanted to view the Foreign Ip Addresses so I used
Code: netstat --tcp --numeric | cut -c 45-65 and that gave me[code]...
There are two things that I am trying to accomplish here. The first is that I would like to "cut" the first three horizontal lines so that the output is only ip addresses.I tried tail but the number of different IPs changes so it still gives me those top lines. I tried head but that doesn't seem to give me any output at all.The second thing I would like to do is to filter out duplicate values. For example the output above has 2 duplicate entries of 66.102.7.101:80
I am trying to write an irc bot to run interactive fiction games in a channel. I am connecting to the channel using nc. I'm having a hell of a time trying to supply input stdin for nc after the connection is established. Here's what's going on. I've got lines of plain text in a file with the irc commands required to identify the bot's ID and join the channel. I can connect easily using any of the following commands
With the first two commands nc connects, reads the file with some time between each line allowing the irc server to respond, bringing me into the channel. It then begins to receive stdin from the command line allowing me to do things like "privmsg #channelname :Hello World!!!" sending messages to the room. This is not the desired behavior. I require nc to take additional stdin from the inputfile if I cat additional text to the end of it.
The last set of commands using the named pipe seem like it does the same, but it doesn't actually send anything to the room, which indicates to me that perhaps nc is continuing to take stdin from the named pipe (this is the desired behavior) rather than dropping to the console for stdin. If I try to cat more plain text data to the end of the named pipe, however, either with something like "echo 'privmsg #channelname :Hello World!!!' > Named_Pipe" (or >> instead of >) or with a filename in place of the "echo" command the whole command simply seems to hang until I press ctrl-C.
I don't understand what I'm doing wrong. With anonymous and named pipes, and with redirection, the problem seems to be the same. nc seems to take it's stdin from the file until it hits the end of file, at which point I can no longer introduce new lines of plain text as stdin for the running nc process.
My router has two bridges, br0 and br1. I'm sharing wifi access, and the guest subnet will be 192.168.2.x.The home subnet will be 192.168.1.x. I want all traffic destined for port 80 from the guest net to forward to a proxy port on a box on the home network. That's the only traffic I want to cross the bridges. How do I set this up with iptables on the router?
Just setup an ssh server...kinda. I need to forward the port (22) through my router. I have forwarded ports before for programs so the whole thing isnt a mystery. But i need to know what to put in for a couple boxes.... Private ip: ? protocol type: tcp, udp, or both?
the time on system clock given with 'date' command keeps moving forward about 1 minute for every hour of realtime. The box is up all the time so this is not an issue with motherboard battery. An equivalent box with the same hardwre/OS and applications doesn't have the same level of drift. I'm not sure what else this could be.Both boxes are Centos 5.2 64-bit.