Make my program listen on a port.
Matthew Carpenter
matt
Mon Jun 19 07:07:40 PDT 2006
Another couple options for this, which is pertinent to the list:
inetd: listen on another port and redirect from one to the other
iptables: iptables -t nat -I PREROUTING -p tcp --dport <origport> -j REDIRECT
--to-ports <desiredport>
You can also try using DNAT if this doesn't produce the desired results.
There are likely other port redirectors which would serve this purpose... for
testing, netcat is always fun to use for this. netcat redirector:
# mknod backpipe p
# while true; do
> nc -l -p <desiredport> 0<backpipe | nc localhost <origport> >backpipe
> done
:)
Have a great day!
ps. <OT> My team, "lastplace", is competing in DefCon 14 Capture the Flag,
August 4-6. If you guys will be there, drop me a note! love to share a
couple minutes over a cup of favorite beverage... what few moments I'll be
able to spare.
On Wednesday 14 June 2006 08:07, Nate Cole wrote:
> This is not the right kind of list to ask this question. You can't
> force java the binary run on a port - the java program either runs with
> a server socket or not.
>
> --- altendew <andrew at shiftcode.com> wrote:
> > I have tried.. not getting back to me. I just needed this done ASAP..
> > I will
> > wait and stop posting.
> >
> > Andrew
> > --
> > View this message in context:
>
> http://www.nabble.com/Make-my-program-listen-on-a-port.-t1780833.html#a4851
>055
>
> > Sent from the Linux Users (linux-sxs.org)! forum at Nabble.com.
> >
> > _______________________________________________
> > Linux-users mailing list ( Linux-users at linux-sxs.org )
> > Unsub/Password/Etc:
> > http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
> >
> > Need to chat further on this subject? Check out #linux-users on
> > irc.linux-sxs.org !
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Linux-users mailing list ( Linux-users at linux-sxs.org )
> Unsub/Password/Etc:
> http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
>
> Need to chat further on this subject? Check out #linux-users on
> irc.linux-sxs.org !
--
Matthew Carpenter
matt at eisgr.com http://www.eisgr.com/
Enterprise Information Systems
* Network Server Appliances
* Security Consulting, Incident Handling & Forensics
* Network Consulting, Integration & Support
* Web Integration and E-Business
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.linux-sxs.org/pipermail/linux-users/attachments/20060619/69d830d7/attachment.pgp
More information about the Linux-users
mailing list