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
ipkungfu(8)						      System Manager's Manual						       ipkungfu(8)

NAME
ipkungfu - An iptables-based firewall for Linux SYNOPSIS
ipkungfu [ -c ] [ -t ] [ -d ] [ -h ] [ -v ] [ --quiet ] [ --panic ] [ --no-caching DESCRIPTION
ipkungfu is an iptables-based Linux firewall. The primary design goals are security, ease of use, and performance, in that order. It takes advantage of advanced features of iptables, tcpwrappers, and the Linux kernel. It also simplifies the configuration of internet connection sharing, advanced routing, and other networking needs. OPTIONS
-c (or --check) Check whether ipkungfu is loaded, and report any command line options it may have been loaded with. -t (or --test) Runs a configuration test, and displays the results. Note that this does not test or display all configuration options. This gives you an opportunity to verify that major configuration options are correct before putting them into action. -d (or --disable) Disables the firewall. It is important to know exactly what this option does. All traffic is allowed in and out, and in the case of a gateway, all NATed traffic is forwarded (the option retains your connection sharing options). Custom rules are not implemented, and deny_hosts.conf is ignored. -f (or --flush) Disables the firewall COMPLETELY. All rules are flushed, all chains are removed. Any port forwarding or internet connection sharing will cease to work. -h (or --help) Displays brief usage information and exits. -v (or --version) Displays version information and exits. --quiet Runs ipkungfu with no standard output --panic Drops ALL traffic in all directions on all network interfaces. You should probably never use this option. The --panic option is available for the highly unusual situation where you know that an attack is underway but you know of no other way to stop it. --failsafe If ipkungfu fails, --failsafe will cause all firewall policies to revert to ACCEPT. This is useful when working with ipkungfu remotely, to prevent loss of remote access due to firewall failure. --no-caching Disables rules caching feature. FILES
/etc/ipkungfu/ipkungfu.conf /etc/ipkungfu/advanced.conf /etc/ipkungfu/accept_hosts.conf /etc/ipkungfu/deny_hosts.conf /etc/ipkungfu/custom.conf /etc/ipkungfu/log.conf /etc/ipkungfu/redirect.conf /etc/ipkungfu/services.conf /usr/sbin/ipkungfu /usr/share/doc/ipkungfu/AUTHORS /usr/share/doc/ipkungfu/README /usr/share/doc/ipkungfu/FAQ /usr/share/doc/ipkungfu/ChangeLog /usr/share/doc/ipkungfu/COPYING SEE ALSO
iptables(8). January 2003 ipkungfu(8)
All times are GMT -4. The time now is 06:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy