LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-07-2006, 10:54 AM   #1
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Rep: Reputation: 282Reputation: 282Reputation: 282
iptables slow [slackware 10.1]


Not sure if it belongs here or in general (or maybe even in security). I'm using sshd for connectivity to my server (172.31.212.37). It's set up for key authentication.

Before running my iptables script (see below):
When I connect from one of the trusted machines (see below) and I enter my username, I'm immediately prompted for my passphrase.

After running the script, this passphrase prompt takes between 15 and 20 seconds to appear.

IPTABLES script
Code:
#!/bin/sh
# initial block
iptables -P INPUT DROP
iptables -P FORWARD DROP

# accept anything on localhost
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT

# allow HTTPS from any machine on 172.*.*.*
iptables -A INPUT -s 172.0.0.0/8 -p tcp --dport 443 -j ACCEPT

# allow SSH from trusted machines
iptables -A INPUT -s 172.31.212.19 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -s 172.31.212.53 -p tcp --dport 22 -j ACCEPT
Any explanation?

FYI
Code:
root@btd-techweb01:/# iptables -nvL
Chain INPUT (policy DROP 335 packets, 68806 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      *       127.0.0.1            127.0.0.1
    0     0 ACCEPT     tcp  --  *      *       172.0.0.0/8          0.0.0.0/0           tcp dpt:443
20353 1603K ACCEPT     tcp  --  *      *       172.31.212.19        0.0.0.0/0           tcp dpt:22
    0     0 ACCEPT     tcp  --  *      *       172.31.212.53        0.0.0.0/0           tcp dpt:22

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 16681 packets, 4901K bytes)
 pkts bytes target     prot opt in     out     source               destination

PS I'm completely new to iptables

Last edited by Wim Sturkenboom; 06-07-2006 at 11:42 AM.
 
Old 06-07-2006, 12:26 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 79
Try looking at the ssh logs. If you don't see anything, try using DEBUG logging level or `ssh -vvv' or similar.
 
Old 06-08-2006, 03:28 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Debug level 3; found this
Code:
Jun  8 09:01:41 btd-techweb01 sshd[3969]: debug3: account expiration disabled
Jun  8 09:01:41 btd-techweb01 sshd[3969]: debug3: Trying to reverse map address 172.31.212.19.
Jun  8 09:02:01 btd-techweb01 sshd[3969]: debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1
The connection started at 09:01:38. The highlighted line takes 20 seconds.

Thank you very much, added the client machine to /etc/hosts and it works as before.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 09:20 PM
Slow downloads through iptables NAT sglow Linux - Networking 14 06-05-2004 01:18 PM
slow connection through iptables/nat rellick Linux - Networking 7 03-19-2004 12:24 AM
Iptables -L view very slow after 4-5 days on Linuxbox(Router) riaz2000 Linux - Security 10 10-30-2003 12:36 AM
IPTables Slow Web Server dwest576 Linux - Networking 1 12-07-2002 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration