[SOLVED] SSH-IPTABLES

Support for security such as Firewalls and securing linux
Post Reply
simsym05
Posts: 37
Joined: 2012/04/28 12:08:56
Location: Tunisia
Contact:

[SOLVED] SSH-IPTABLES

Post by simsym05 » 2012/06/14 03:13:11

Good Morning;
i need your help please, first this is my architecture:
http://www.tn-live.com/architecture-reseau.jpg

from networking department i need to ssh centos firewall and have web access to ipcop;

first i need to allow ssh so this is what i did:

#iptables -F
#iptables -X
#iptables -P INPUT DROP
#iptables -P OUTPUT DROP
#iptables -P FORWARD DROP
#service iptables save
#service iptables restart

sshd is working
and if i change the rules to accept, ssh is working fine from any department !

Then i tried several command to open ssh access from networking department (only this address should be allowed to access via port 22; 10.1.1.2) to centos FW (eth1: 10.1.1.1) but without success !!
this is an example from what i did:

#iptables -A INPUT -s 10.1.1.2 -d 10.1.1.1 -p tcp --dport 22 -j ACCEPT
#iptables -A OUTPUT -s 10.1.1.1 -d 10.1.1.2 -p tcp --dport 22 -j ACCEPT

but without succes, and i tried some other command from google but i still not have access

could you please help me to understand this issue and then fix it?

Thanks in advance :-) :-)

simsym05
Posts: 37
Joined: 2012/04/28 12:08:56
Location: Tunisia
Contact:

Re: SSH-IPTABLES

Post by simsym05 » 2012/06/14 03:48:53

i just solved this issue; this is the solution:


#iptables –A INPUT –s 10.1.1.2 –p tcp –dport 22 –j ACCEPT
#iptables –A OUTPUT –d 10.1.1.2 –p tcp –sport 22 –j ACCEPT
#service iptables save
#service iptables restart

this topic has been sent twice

Have a nice day

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] SSH-IPTABLES

Post by pschaff » 2012/06/14 11:39:16

Thanks for reporting back. Marking this thread [SOLVED] for posterity. Your duplicate post has been deleted.

Post Reply

Return to “CentOS 6 - Security Support”