I would like to test a particular port in Solaris, to see if the firewall rules are ok.
Should I install an application, but as yet I have not, have to force solaris to keep an open door, and put any application listening to port 1099, and will test a terminal connectivity via Telnet or Ping.
How do I put the port 1099 open and simulate an application that is listening on that port?
You can adjust /etc/services and /etc/inetd.conf to also offer telnet on the port. Then you can open telnet from a client to that port are see if it open.
If you add a line to /etc/services such as:-
mytelnet 1099/tcp
and add a line to /etc/inetd.conf such as:-
mytelnet stream tcp6 nowait root /usr/sbin/telnetd telnetd -a
... and then signal inetd to re-read it's config, that should be enough. Check you man page for inetd or inetd.conf. It will probably suggest you send a kill -2, kill -HUP or something similar to the inetd process. Check you man page before issuing either of these in case they cause inetd to terminate and drop all network connections/services leaving just the console to get back in.
Then, from an appropriate client (suitable source address to test your firewall) issue:-
telnet put.ip.address.here 1099
You should get an instant response. If you get a login prompt, then on the server, you can run:-
It depends if your OS has that command of course. It seems to be a general Linux command rather than the commercial Solaris, HPUX or AIX for simple searching.
That's a shame, because that would save me some effort too. Our network chaps have it locked down pretty tight (and quite right too) but when you get an agreement to open something, they insist on an immediate test which makes life a bit hard. If there is something so simple as netcat on other OSs, then I'd like to know.