CentOS 5.9
For testing purposes, I want my CentOS server to listen on a secondary virtual IP (eth0:0). I'm familiar with nc -l -p <port>
but it only listens on the primary. Is there a way I can specify a specific IP for the listener to use?
If not, is there another "stock" utility in CentOS 5.9 that can do this?
The syntax depends on the
netcat
package.netcat-openbsd
netcat-traditional
A simple way (at least in bash) for telling them apart in scripts is:
For completion:
should work too. Works with nc6 version 1.0 and netcat (The GNU Netcat) 0.7.1.
The command from Laging doesn't work with nc6 (used in debian).