Sponsored Content
Special Forums IP Networking telnet for port 5433 is not working while it works for port 22 Post 302693441 by hergp on Wednesday 29th of August 2012 08:23:48 AM
Old 08-29-2012
Probably the iptables firewall. You have to add a rule for port 5433 (port 22 is open in the default configuration).

First have a look at the file /etc/sysconfig/iptables
Code:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 19102 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Now find a nice spot somewhere in between the existing accept rules

Code:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5433 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 19102 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Save your changes and restart the firewall:

Code:
service iptables restart

This User Gave Thanks to hergp For This Post:
 

10 More Discussions You Might Find Interesting

1. IP Networking

block telnet to specific port

Hello All I am running redhat linux 7.2 and would like to know how i can block telnetting to a specified port . say for example i would like to block telnet acesses to port 80. regards Xiamin (5 Replies)
Discussion started by: xiamin
5 Replies

2. Solaris

disabled telnet now need port 23 or port 22

we disabled telnet on solaris 9 via previous a thread. We use CMS (call management system) supervisor which used port 23 (telnet). We cannot use telnet via local directive and it was shut down as stated when we shut down telnet in the inetd file. I cannot now log into the CMS box since port 23 is... (3 Replies)
Discussion started by: panzerkw
3 Replies

3. UNIX for Advanced & Expert Users

telnet on specific port??

Hi all, I have a problem. I have machine names and their IP addresses in /etc/hosts file. My application does telnet on that machine host name. The application does not uses IP address for tenet. It will fetch the host name from /etc/hosts file. Now the telnet server runs on customized port.... (6 Replies)
Discussion started by: zing_foru
6 Replies

4. Shell Programming and Scripting

Telnet IP and Port Script

Hi, I would like to create a simple script that will telnet a number of IP and Ports one after the other to confirm connectivity to those addresses. I don't need to log on, just output to a file what the response is, i.e Escape Character, connectivity refused etc. Complete newbie to... (6 Replies)
Discussion started by: asou
6 Replies

5. AIX

Telnet to port

can some one help me ? what happens when we telnet to a port ? example telnet 192.168.0.xx 1234 where 1234 is a port number Thank you (5 Replies)
Discussion started by: anwesh
5 Replies

6. Windows & DOS: Issues & Discussions

Telnet to a serial port

Hello all. I have an old computer with M$-DOS 7. I want to use it like a dumb terminal, with telnet. I need to connect it to my desktop These are my questions: How can i configure the serial port on dos? How can i telnet form dos to the serial port? How can i set up a telnet server on the... (12 Replies)
Discussion started by: mghis
12 Replies

7. Cybersecurity

Can't telnet to port 25 on the host.

Hi, we have recently setup a new UNIX server with solaris 10 and I am having issue with with SMTP/sendmail. telnet localhost 25 --- works telnet hostname.domain.com 25 -- does not work. # telnet hostname.domain.com 25 Trying 10.122.1.111... telnet: Unable to connect to remote host:... (1 Reply)
Discussion started by: esmgr
1 Replies

8. Red Hat

telnet port 23

My linux version is 2.6.18-194.e14 (Oracle enterprise linux). Could you please tell me how to enable telnet on the server. When I try to connect the server through another pc using telnet it is throwing error. Connecting To <ip address>...Could not open connection to the host, on port 23.... (3 Replies)
Discussion started by: oradba_arun
3 Replies

9. UNIX for Dummies Questions & Answers

telnet echoing 'trying ip' but no port number

Hi, Well this is probably a silly one that I should know...but I don't ! I'm telnetting to various ports from a shell script and the telnet is echoing back that it's 'trying xxx.xx.xx.xx...' but not the port number it's trying! Any help much appreciated Thanks (1 Reply)
Discussion started by: Grueben
1 Replies

10. 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
IPTables::Parse(3pm)					User Contributed Perl Documentation				      IPTables::Parse(3pm)

NAME
IPTables::Parse - Perl extension for parsing iptables and ip6tables policies SYNOPSIS
use IPTables::Parse; my $ipt_bin = '/sbin/iptables'; # can set this to /sbin/ip6tables my %opts = ( 'iptables' => $ipt_bin, 'iptout' => '/tmp/iptables.out', 'ipterr' => '/tmp/iptables.err', 'debug' => 0, 'verbose' => 0 ); my $ipt_obj = new IPTables::Parse(%opts) or die "[*] Could not acquire IPTables::Parse object"; my $rv = 0; my $table = 'filter'; my $chain = 'INPUT'; my ($ipt_hr, $rv) = $ipt_obj->default_drop($table, $chain); if ($rv) { if (defined $ipt_hr->{'all'}) { print "The INPUT chain has a default DROP rule for all protocols. "; } else { for my $proto (qw/tcp udp icmp/) { if (defined $ipt_hr->{$proto}) { print "The INPUT chain drops $proto by default. "; } } } } else { print "[-] Could not parse $ipt_obj->{'_ipt_bin_name'} policy "; } ($ipt_hr, $rv) = $ipt_obj->default_log($table, $chain); if ($rv) { if (defined $ipt_hr->{'all'}) { print "The INPUT chain has a default LOG rule for all protocols. "; } else { for my $proto (qw/tcp udp icmp/) { if (defined $ipt_hr->{$proto}) { print "The INPUT chain logs $proto by default. "; } } } } else { print "[-] Could not parse $ipt_obj->{'_ipt_bin_name'} policy "; } DESCRIPTION
The "IPTables::Parse" package provides an interface to parse iptables or ip6tables rules on Linux systems through the direct execution of iptables/ip6tables commands, or from parsing a file that contains an iptables/ip6tables policy listing. You can get the current policy applied to a table/chain, look for a specific user-defined chain, check for a default DROP policy, or determing whether or not logging rules exist. FUNCTIONS
The IPTables::Parse extension provides an object interface to the following functions: chain_policy($table, $chain) This function returns the policy (e.g. 'DROP', 'ACCEPT', etc.) for the specified table and chain: print "INPUT policy: ", $ipt_obj->chain_policy('filter', 'INPUT'), " "; chain_rules($table, $chain) This function parses the specified chain and table and returns an array reference for all rules in the chain. Each element in the array reference is a hash with the following keys (that contain values depending on the rule): "src", "dst", "protocol", "s_port", "d_port", "target", "packets", "bytes", "intf_in", "intf_out", "to_ip", "to_port", "state", "raw", and "extended". The "extended" element contains the rule output past the protocol information, and the "raw" element contains the complete rule itself as reported by iptables or ip6tables. default_drop($table, $chain) This function parses the running iptables or ip6tables policy in order to determine if the specified chain contains a default DROP rule. Two values are returned, a hash reference whose keys are the protocols that are dropped by default if a global ACCEPT rule has not accepted matching packets first, along with a return value that tells the caller if parsing the iptables or ip6tables policy was successful. Note that if all protocols are dropped by default, then the hash key 'all' will be defined. ($ipt_hr, $rv) = $ipt_obj->default_drop('filter', 'INPUT'); default_log($table, $chain) This function parses the running iptables or ip6tables policy in order to determine if the specified chain contains a default LOG rule. Two values are returned, a hash reference whose keys are the protocols that are logged by default if a global ACCEPT rule has not accepted matching packets first, along with a return value that tells the caller if parsing the iptables or ip6tables policy was successful. Note that if all protocols are logged by default, then the hash key 'all' will be defined. An example invocation is: ($ipt_hr, $rv) = $ipt_obj->default_log('filter', 'INPUT'); AUTHOR
Michael Rash, <mbr@cipherdyne.org> SEE ALSO
The IPTables::Parse is used by the IPTables::ChainMgr extension in support of the psad and fwsnort projects to parse iptables or ip6tables policies (see the psad(8), and fwsnort(8) man pages). As always, the iptables(8) and ip6tables(8) man pages provide the best information on command line execution and theory behind iptables and ip6tables. Although there is no mailing that is devoted specifically to the IPTables::Parse extension, questions about the extension will be answered on the following lists: The psad mailing list: http://lists.sourceforge.net/lists/listinfo/psad-discuss The fwsnort mailing list: http://lists.sourceforge.net/lists/listinfo/fwsnort-discuss The latest version of the IPTables::Parse extension can be found on CPAN and also here: http://www.cipherdyne.org/modules/ Source control is provided by git: http://www.cipherdyne.org/git/IPTables-Parse.git http://www.cipherdyne.org/cgi-bin/gitweb.cgi?p=IPTables-Parse.git;a=summary CREDITS
Thanks to the following people: Franck Joncourt <franck.mail@dthconnex.com> Grant Ferley AUTHOR
The IPTables::Parse extension was written by Michael Rash <mbr@cipherdyne.org> to support the psad and fwsnort projects. Please send email to this address if there are any questions, comments, or bug reports. COPYRIGHT AND LICENSE
Copyright (C) 2005-2012 Michael Rash. All rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. More information can be found here: http://www.perl.com/perl/misc/Artistic.html This program is distributed "as is" in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. perl v5.14.2 2012-03-05 IPTables::Parse(3pm)
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy