Listen given port


 
Thread Tools Search this Thread
Operating Systems Solaris Listen given port
# 1  
Old 08-15-2012
Listen given port

Good morning!

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?
# 2  
Old 08-15-2012
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:-
Code:
mytelnet 1099/tcp

and add a line to /etc/inetd.conf such as:-
Code:
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:-
Code:
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:-
Code:
netstat -na|grep 1099

... and see what is connected.


I hope that this helps.

Robin
Liverpool/Blackburn
UK
This User Gave Thanks to rbatte1 For This Post:
# 3  
Old 08-15-2012
You can also use netcat as user: netcat -v -l -p 1099. Then attempt telnet from outside firewall.
This User Gave Thanks to neutronscott For This Post:
# 4  
Old 08-15-2012
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.



Robin

Last edited by rbatte1; 08-15-2012 at 11:35 AM.. Reason: Spelling
# 5  
Old 08-15-2012
That's it! It worked perfectly!

Thank you!
# 6  
Old 08-16-2012
You are welcome, I'm sure. Which solution did you use?

I'd like to know if there is and equivilent simple tool such as netcat for Solaris, HPUX & AIX. It would save me a lot of messing about.

You can register your thanks to the best solution by clicking the appropriate Thanks button. That will also help us see who did the business.

I have just put thanks to neutronscott for the pointer to a nice tool.




Robin
Liverpool/Blackburn
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

2. HP-UX

What is the Listen Address of my process ?

Hi, We cant set the listen address of my java process to the IP address or any of the DNS names listen in the hosts file of the server. We can access the resources of the pid in the web browser through http://<IP / DNS>:port/console Based on the pid, how can we find what is the listen... (6 Replies)
Discussion started by: mohtashims
6 Replies

3. IP Networking

Configure squid to listen on any IP address with port 80

Hi, I am trying to configure a transparent squid cache. When I try to use the below option in squid.conf, squid listens on port 80 only for the IP address configured on the system's interface. http_port 80 transparent But I want squid to accept connections for any IP address on port 80.... (3 Replies)
Discussion started by: Learner32
3 Replies

4. Solaris

socket in listen state disappears/closes automatically

Hi, I am using solaris 10. I have opened a socket connection using java in solaris 10 operating system, the port went to LISTEN state and able to create new socket connection and the new connections went to ESTABLISHED state. If I issue the command "netstat -an | grep <<portnumber>>", I... (10 Replies)
Discussion started by: kumar3k
10 Replies

5. Shell Programming and Scripting

Program to listen a port

I need to launch a script as soon as a file comes via a specified port on my system from another system. Program should work as a dameon and should invoke only when port start/stop accepting file. Any idea how to program/script it... Please no suggestions for cron. Thanks in advance. (1 Reply)
Discussion started by: sumitwa
1 Replies

6. UNIX for Advanced & Expert Users

Let NTP listen only on one interface

Hallo, I have a machine which serves as NTP server. This machine has more (3) Network interfaces (+ loopback). By default NTP "binds" itself to all available interfaces, i.e. it listens on port 123 on all interfaces: netstat -an|grep 123 udp 0 0 127.0.0.1.123 *.* udp... (0 Replies)
Discussion started by: one71
0 Replies

7. UNIX for Dummies Questions & Answers

listen to ports...

Hi all, How can I log all requests on ports for programs like ftp, telnet, rsh, xdmcp etc... I want to see if anyone uses these programs/protocols and how often. Is it difficult to setup a log for these ports and listen on all requests? /combat (4 Replies)
Discussion started by: tonlu
4 Replies
Login or Register to Ask a Question