Re: listen on tcp port and log input ??
Marcel Welschbillig wrote: > > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? I think netcat will work: netcat -l -p port.you.wont.to.listen > /home/user/file it will listen for a connection at the specifig port and write the data to the file. After the connection ist stoped the netcat will return. If you wont sevral connections one after another and write it all to the file a script like: #! /bin/bash while [ 1 -lt 2 ] ; do netcat -l -p port.you.wont.to.listen >> /home/user/file done exit 0 will add the data in the file. ingo -- ingo dross infomation/security architecture []___¸ ##-\ O_-_-_O-\
Re: listen on tcp port and log input ??
Marcel Welschbillig wrote: > > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? I think netcat will work: netcat -l -p port.you.wont.to.listen > /home/user/file it will listen for a connection at the specifig port and write the data to the file. After the connection ist stoped the netcat will return. If you wont sevral connections one after another and write it all to the file a script like: #! /bin/bash while [ 1 -lt 2 ] ; do netcat -l -p port.you.wont.to.listen >> /home/user/file done exit 0 will add the data in the file. ingo -- ingo dross infomation/security architecture []___¸ ##-\ O_-_-_O-\ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 01:22:21PM +1000, Malcolm Herbert wrote: > On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > |Dose anybody know of any programs i could use to open a port on a debian > |box and log the data that comes in to a file ?? > > try netcat > or daemontools' tcpserver. Gerrit. -- [EMAIL PROTECTED] innominate AG tel: +49.30.308806-0 fax: -77 http://www.innominate.com
Re: listen on tcp port and log input ??
Marcel Welschbillig <[EMAIL PROTECTED]> wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a file. > The data will be PBX billing data from a remote site. Try netcat. Package: netcat Version: 1.10-12.1 Priority: optional Section: net Maintainer: Robert S. Edmonds <[EMAIL PROTECTED]> Depends: libc6 (>= 2.1.2) Architecture: i386 Filename: dists/potato/main/binary-i386/net/netcat_1.10-12.1.deb Size: 61504 MD5sum: f72fc6771f54f9785a058366450293e4 Description: TCP/IP swiss army knife A simple Unix utility which reads and writes data across network connections using TCP or UDP protocol. It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. installed-size: 264 -- Oohara Yuuma <[EMAIL PROTECTED]> Graduate-school of Science, Kyoto University PGP Key http://www.interq.or.jp/libra/oohara/pub-key.txt Key fingerprint = 6142 8D07 9C5B 159B C170 1F4A 40D6 F42E F464 A695 I always put away what I take. --- Ryuji Akai, "Star a way"
Re: listen on tcp port and log input ??
You may find one of my favorite utilities will do the trick: netcat. nc -l -p 3000 Listens on TCP port 3000 and once there is a connection, sends stdin to the remote host, and sends data from the remote host to stdout. You can redirect stdout to a file or use the -o option. See "man nc." In anycase, this is not what I would call a robust solution for something as important as billing. It is a nice way to begin snooping data from the router. Cisco routers output lots of billing data in a variety of ways. Your problem may be better solved with the IPPR, CDR, or RADIUS accounting records. /paul Marcel Welschbillig ([EMAIL PROTECTED]) said: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a file. > The data will be PBX billing data from a remote site. > > Any clues would be great ! > > Marcel
Re: listen on tcp port and log input ??
Marcel Welschbillig <[EMAIL PROTECTED]> writes: > Dose anybody know of any programs i could use to open a port on a > debian box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a > file. The data will be PBX billing data from a remote site. > > Any clues would be great ! $ port="the port you want your cisco box to connect to" $ host="the IP address your cisco box is going to be connecting from" $ cat > /usr/local/bin/cisco-log < >(while read line; do logger -i "\$line"; done) exec cat >> /tmp/cisco-log EOD $ cat >> /etc/services <> /etc/hosts.allow <> /etc/hosts.deny <> /etc/inetd.conf <
Re: listen on tcp port and log input ??
Thanks all for your input, I have tried netcat and it dose exactly what i want, tha data is just text so no probs ! Marcel Long live LINUX ! Malcolm Herbert wrote: On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: |Dose anybody know of any programs i could use to open a port on a debian |box and log the data that comes in to a file ?? try netcat
Re: listen on tcp port and log input ??
Does the router support remote syslogging? If so you could open a remote syslogging report and only let it reply to packets sent from the router with iptables or ipchains. Warren On Tuesday 04 September 2001 19:56, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a > debian box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves > on an AUX port to a tcp port on a linux machine and log the data to a > file. The data will be PBX billing data from a remote site. > > Any clues would be great ! > > Marcel
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? Well, for totally raw data you could use netcat. Try nc -lp PORT > FILE This will only listen for one connection then quit, however. I'm not sure if thats what you want. Its a place to start, anyway. -- Steven Barker [EMAIL PROTECTED] Goldenstern's Rules: (1) Always hire a rich attorney (2) Never buy from a rich salesman. GnuPG public key: http://www.students.uiuc.edu/~scbarker/pubkey.asc Fingerprint: 272A 3EC8 52CE F22B F745 775E 5292 F743 EBD5 936B
Re: listen on tcp port and log input ??
#!/bin/sh while true ; do nc -l -p 1234 >> /tmp/logfile done On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? -- Jason Thomas Phone: +61 2 6257 7111 System Administrator - UID 0 Fax:+61 2 6257 7311 tSA Consulting Group Pty. Ltd. Mobile: 0418 29 66 81 1 Hall Street Lyneham ACT 2602 http://www.topic.com.au/ pgphg2SQpUv6Y.pgp Description: PGP signature
Re: listen on tcp port and log input ??
Marcel Welschbillig wrote: Dose anybody know of any programs i could use to open a port on a debian box and log the data that comes in to a file ?? What i want to do is have a CISCO router send data that it recieves on an AUX port to a tcp port on a linux machine and log the data to a file. The data will be PBX billing data from a remote site. Any clues would be great ! Marcel What about using the lp daemon to listen for an incoming connection from the router and print the data to a file. Or, you could configure the router to use syslog and configure the Linux host to log certain data from the router. These are just some ideas, I can't say that I've tried them before. Stef
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: |Dose anybody know of any programs i could use to open a port on a debian |box and log the data that comes in to a file ?? try netcat -- Malcolm HerbertThis brain intentionally [EMAIL PROTECTED]left blank
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 01:22:21PM +1000, Malcolm Herbert wrote: > On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > |Dose anybody know of any programs i could use to open a port on a debian > |box and log the data that comes in to a file ?? > > try netcat > or daemontools' tcpserver. Gerrit. -- [EMAIL PROTECTED] innominate AG tel: +49.30.308806-0 fax: -77 http://www.innominate.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
Marcel Welschbillig <[EMAIL PROTECTED]> wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a file. > The data will be PBX billing data from a remote site. Try netcat. Package: netcat Version: 1.10-12.1 Priority: optional Section: net Maintainer: Robert S. Edmonds <[EMAIL PROTECTED]> Depends: libc6 (>= 2.1.2) Architecture: i386 Filename: dists/potato/main/binary-i386/net/netcat_1.10-12.1.deb Size: 61504 MD5sum: f72fc6771f54f9785a058366450293e4 Description: TCP/IP swiss army knife A simple Unix utility which reads and writes data across network connections using TCP or UDP protocol. It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. installed-size: 264 -- Oohara Yuuma <[EMAIL PROTECTED]> Graduate-school of Science, Kyoto University PGP Key http://www.interq.or.jp/libra/oohara/pub-key.txt Key fingerprint = 6142 8D07 9C5B 159B C170 1F4A 40D6 F42E F464 A695 I always put away what I take. --- Ryuji Akai, "Star a way" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
You may find one of my favorite utilities will do the trick: netcat. nc -l -p 3000 Listens on TCP port 3000 and once there is a connection, sends stdin to the remote host, and sends data from the remote host to stdout. You can redirect stdout to a file or use the -o option. See "man nc." In anycase, this is not what I would call a robust solution for something as important as billing. It is a nice way to begin snooping data from the router. Cisco routers output lots of billing data in a variety of ways. Your problem may be better solved with the IPPR, CDR, or RADIUS accounting records. /paul Marcel Welschbillig ([EMAIL PROTECTED]) said: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a file. > The data will be PBX billing data from a remote site. > > Any clues would be great ! > > Marcel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
Marcel Welschbillig <[EMAIL PROTECTED]> writes: > Dose anybody know of any programs i could use to open a port on a > debian box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a > file. The data will be PBX billing data from a remote site. > > Any clues would be great ! $ port="the port you want your cisco box to connect to" $ host="the IP address your cisco box is going to be connecting from" $ cat > /usr/local/bin/cisco-log < >(while read line; do logger -i "\$line"; done) exec cat >> /tmp/cisco-log EOD $ cat >> /etc/services <> /etc/hosts.allow <> /etc/hosts.deny <> /etc/inetd.conf <
Re: listen on tcp port and log input ??
Thanks all for your input, I have tried netcat and it dose exactly what i want, tha data is just text so no probs ! Marcel Long live LINUX ! Malcolm Herbert wrote: > On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > |Dose anybody know of any programs i could use to open a port on a debian > |box and log the data that comes in to a file ?? > > try netcat -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
Does the router support remote syslogging? If so you could open a remote syslogging report and only let it reply to packets sent from the router with iptables or ipchains. Warren On Tuesday 04 September 2001 19:56, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a > debian box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves > on an AUX port to a tcp port on a linux machine and log the data to a > file. The data will be PBX billing data from a remote site. > > Any clues would be great ! > > Marcel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? Well, for totally raw data you could use netcat. Try nc -lp PORT > FILE This will only listen for one connection then quit, however. I'm not sure if thats what you want. Its a place to start, anyway. -- Steven Barker [EMAIL PROTECTED] Goldenstern's Rules: (1) Always hire a rich attorney (2) Never buy from a rich salesman. GnuPG public key: http://www.students.uiuc.edu/~scbarker/pubkey.asc Fingerprint: 272A 3EC8 52CE F22B F745 775E 5292 F743 EBD5 936B -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
#!/bin/sh while true ; do nc -l -p 1234 >> /tmp/logfile done On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a debian > box and log the data that comes in to a file ?? -- Jason Thomas Phone: +61 2 6257 7111 System Administrator - UID 0 Fax:+61 2 6257 7311 tSA Consulting Group Pty. Ltd. Mobile: 0418 29 66 81 1 Hall Street Lyneham ACT 2602 http://www.topic.com.au/ PGP signature
Re: listen on tcp port and log input ??
Marcel Welschbillig wrote: > Dose anybody know of any programs i could use to open a port on a > debian box and log the data that comes in to a file ?? > > What i want to do is have a CISCO router send data that it recieves on > an AUX port to a tcp port on a linux machine and log the data to a > file. The data will be PBX billing data from a remote site. > > Any clues would be great ! > > Marcel > > What about using the lp daemon to listen for an incoming connection from the router and print the data to a file. Or, you could configure the router to use syslog and configure the Linux host to log certain data from the router. These are just some ideas, I can't say that I've tried them before. Stef -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: listen on tcp port and log input ??
On Wed, Sep 05, 2001 at 08:56:59AM +0800, Marcel Welschbillig wrote: |Dose anybody know of any programs i could use to open a port on a debian |box and log the data that comes in to a file ?? try netcat -- Malcolm HerbertThis brain intentionally [EMAIL PROTECTED]left blank -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
listen on tcp port and log input ??
Dose anybody know of any programs i could use to open a port on a debian box and log the data that comes in to a file ?? What i want to do is have a CISCO router send data that it recieves on an AUX port to a tcp port on a linux machine and log the data to a file. The data will be PBX billing data from a remote site. Any clues would be great ! Marcel
listen on tcp port and log input ??
Dose anybody know of any programs i could use to open a port on a debian box and log the data that comes in to a file ?? What i want to do is have a CISCO router send data that it recieves on an AUX port to a tcp port on a linux machine and log the data to a file. The data will be PBX billing data from a remote site. Any clues would be great ! Marcel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]