LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-08-2020, 03:27 AM   #1
testy8888
Member
 
Registered: Jul 2020
Posts: 38

Rep: Reputation: Disabled
iptable


Hi,
I like to see if i undersood well.

iptables -L
Chain OUTPUT (policy ACCEPT)
ACCEPT all -- anywhere 10.129.0.0/16 owner GID match testy

user y has uid=101(y) gid=101(testy) and user y5 has uid=(104) gid=104(y4)

in this case only user y can login by ssh in this server.right?
 
Old 08-08-2020, 03:43 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
The output from iptables-save would be more useful to read. Also, if you are just starting with the packet filter, you might focus on nftables instead, it is the direction that the kernel has moved. iptables is considered deprecated.

However, if you want to restrict incoming SSH logins, do that via the SSH daemon's configuration file. See "man sshd_config" and look at the AllowGroups and DenyGroups configuration directives. Both iptables, and even nftables would be the wrong tool for that.
 
Old 08-08-2020, 07:40 AM   #3
testy8888
Member
 
Registered: Jul 2020
Posts: 38

Original Poster
Rep: Reputation: Disabled
i only need to see if that rule allow user y to open session on ssh protocol,it can be ssh,scp,sftp session.
and if user y5 can not open ssh session. or what this rule does.
 
Old 08-08-2020, 08:56 AM   #4
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
Have you checked the man page for iptables? You have defined acceptable ips and uid/gids but have said nothing to the firewall about ports. Therefore it will not worry about ports, ssh or any other port. You might also do better using the command
Code:
 sudo iptables -L -v- n
which will give you a bit more information.
 
  


Reply



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
iptable how many rule iptable can manage toure32 Linux - Networking 1 05-13-2010 04:34 AM
what is an iptable? & how to seperate the network on the basis of iptable vinod.wagh Linux - Networking 1 09-11-2008 01:28 AM
unable get dhcp with iptable firewall active LionKing Linux - Networking 4 02-19-2002 06:33 PM
Iptable - upgrade for kernel 2.4.10 RH Smithpl Linux - Networking 4 11-16-2001 07:51 AM
iptable log cmardhekar Linux - Newbie 0 09-14-2001 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:49 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