Sponsored Content
Top Forums Shell Programming and Scripting Script to check numerous ports / servers (Solaris native) Post 302827467 by jibberish on Friday 28th of June 2013 07:26:53 PM
Old 06-28-2013
[Solved] Script to check numerous ports / servers (Solaris native)

Hi

I'd like to check that a bunch of firewall rules have been applied and, therefore, want to write a script that basically does the following:
Code:
telnet serverA port1
telnet serverA port2
telnet serverB port1
telnet serverB port2

I would just compile the list in excel and run it as a script and pipe the output to a file, but telnet makes me hit the ^] keys to get out of a connection.

This is a work server running Solaris 10 and I don't have the option of running any non-native Solaris utilities.

I'm a bit of a noob with this stuff, so any help would be very much appreciated.

Thanks

Jibb Smilie

Last edited by vbe; 06-29-2013 at 08:20 AM.. Reason: code tags
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Telnet script to test open ports on mult servers

Hello All, Can somebody help me with this script. I have an output file with a list of servers ips and ports. I need to be able to run this script to list all the server ips in the outfile and find out if the port is open or not. #!/bin/sh IFS=#;for i in $(cat portTest); do # check... (2 Replies)
Discussion started by: liketheshell
2 Replies

2. HP-UX

Need to decommission numerous HP N class servers...any thoughts to do quickly?

I have numerous N-class servers with internal and external disks that I need to wipe. Does anyone have any ideas to do this quick and painless. Anything other than a sledge hammer Also, do I need to be in single-user mode and if so how do I do that? Servers are running 11.11 Thanks (3 Replies)
Discussion started by: itry
3 Replies

3. Shell Programming and Scripting

Script to automatically check ports in shell?

Good day, I'm new to linux environment...Is there any scripts available for me to check ports (lets say port 80 and 21) through shell with just a single commandline? Any response is very much appreciated.. thanks (4 Replies)
Discussion started by: arsonist
4 Replies

4. Solaris

solaris native binary ...querry

In a solaris 8 machine the native binaries are mainly kept under /bin and /usr/bin but some binaries i found in /usr/xpg4/bin please can anyone tell me in a little detail what is the reason to keep the binaries in different locations i mean /bin /usr/bin /usr/xpg4/bin ... (1 Reply)
Discussion started by: mobydick
1 Replies

5. UNIX for Advanced & Expert Users

Iptables for NFS Servers, random ports?

This may seem like a silly question, but how do you iptable firewall an NFS Server tightly? I tend to use Samba much more heavily which is easy, the ports are clearly defined... but on NFS it is relying on portmapper (yuck).... so the ports may change... Is it possible to fix the NFS Server ports,... (2 Replies)
Discussion started by: humbletech99
2 Replies

6. Solaris

How to check power consumption of Solaris servers ?

hi friends, we are relocating our DC and need to plan out electrical power for the new DC. are there ways i could find the actual power consumption from my current servers ? instead of the product specs. (2 Replies)
Discussion started by: Exposure
2 Replies

7. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies

8. Shell Programming and Scripting

Script to check if SQLLDR has been installed on Unix/Aix servers

How can i check if sqlldr has been installed on my AIX/UNIX mechine? Is there any unix script to check this one out.... (0 Replies)
Discussion started by: msrahman
0 Replies

9. UNIX for Advanced & Expert Users

Shell script to check the /etc/default/kbd file on a list of SUN servers

Hello, I want to create a shell script that would check the file "/etc/default/kbd" for the entry KEYBOARD_ABORT=alternate on a list of SUN Solaris servers. If this entry is not uncommented (without #) then I should get a message/error report for the host which does not have the setting... (3 Replies)
Discussion started by: mahive
3 Replies
FGADM(8)						      System Manager's Manual							  FGADM(8)

NAME
fgadm - filtergen command program SYNOPSIS
fgadm [ check | reload | save | stop ] DESCRIPTION
fgadm is a simple command interface for managing filtergen(8) based packet filters. USAGE
fgadm can be used to stop existing filters (thus turning them off), reload new packet filters, save currently running filters for longevity, and to check filter scripts for errors before reloading. The following commands are accepted by fgadm: check Check the filter script /etc/filtergen/rules.filter for errors. The generated filter will be printed on standard output, and errors printed to standard error. reload Replace the current live packet filter with the one in /etc/filtergen/rules.filter. The script will be tested for errors before reloading. save The current live packet filter will be saved in a distribution-friendly way. On Red Hat systems, this will save the iptables or ipchains firewall that is currently loaded into the kernel to load at boot with the iptables or ipchains initscript. stop This command will flush the current live packet filter out and put it in a default accept mode, thus no firewalling will be in place. This is useful to abort firewalls in an emergency. EXAMPLES
One may find the following sequence of commands useful for making firewall changes on live servers: # at now + 2 min warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh at> fgadm stop at> ^D<EOT> job 53 at 2004-06-07 17:25 # fgadm check # fgadm reload # atq 53 # atrm 53 # fgadm save FILES
/etc/filtergen/rules.filter Packet filter descriptions are read from this file when fgadm is used. /etc/filtergen/fgadm.conf This file alters the behaviour of filtergen as called from fgadm. BUGS
fgadm save does not work on Debian systems with iptables due to a lack of common sense in the iptables package. SEE ALSO
filtergen(8), filter_syntax(5), filter_backends(5) AUTHOR
fgadm was written by Jamie Wilkinson <jaq@spacepants.org> for the filtergen package, to ease maintenance of filtergen-based firewalls. June 7, 2004 FGADM(8)
All times are GMT -4. The time now is 10:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy