All of lore.kernel.org
 help / color / mirror / Atom feed
* Port is open but I am unable to connect
@ 2004-09-07 19:27 Jacob Friis Larsen
  2004-09-07 19:35 ` Sascha Reissner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jacob Friis Larsen @ 2004-09-07 19:27 UTC (permalink / raw)
  To: netfilter

When I add -s 1.2.3.4 I am unable to connect to my server.
nmap shows that the correct ports are open.
Any ideas?

iptables -A INPUT -s 1.2.3.4 -j ACCEPT -p tcp --dport 22 -m state 
--state NEW

This is my script:
<script>
#!/bin/sh

# Modules
modprobe ip_conntrack_ftp

# Defaults
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP

# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F

# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Localhost
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

# Open ports on router for server/services
iptables -A INPUT -s 1.2.3.4 -j ACCEPT -p tcp --dport 20 -m state 
--state NEW
iptables -A INPUT -s 1.2.3.4 -j ACCEPT -p tcp --dport 21 -m state 
--state NEW
iptables -A INPUT -s 1.2.3.4 -j ACCEPT -p tcp --dport 22 -m state 
--state NEW
iptables -A INPUT -j ACCEPT -p tcp --dport 25 -m state --state NEW
iptables -A INPUT -j ACCEPT -p tcp --dport 80 -m state --state NEW
iptables -A INPUT -j ACCEPT -p tcp --dport 143 -m state --state NEW
iptables -A INPUT -j ACCEPT -p tcp --dport 993 -m state --state NEW
</script>

Thanks,
Jacob


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-09-09 12:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07 19:27 Port is open but I am unable to connect Jacob Friis Larsen
2004-09-07 19:35 ` Sascha Reissner
2004-09-08  6:34   ` Jacob Friis Larsen
2004-09-07 20:19 ` Jason Opperisano
2004-09-08  6:38   ` Jacob Friis Larsen
2004-09-08 11:35     ` Jason Opperisano
2004-09-07 20:59 ` Aleksandar Milivojevic
2004-09-08  6:47   ` Jacob Friis Larsen
2004-09-09 10:17     ` Jacob Friis Larsen
2004-09-09 12:20       ` Jason Opperisano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.