I am using telnet because of a barcode reader. It is pretty old before 2000 i think and it seems that it supports only telnet via wifi connection. However how can i restrict telnet access to only this device ip and to only one user?
How can i force that only a terminal application is executed and when it is closed no one can make any change to the system?
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
||||
|
|
|
I don't use telnet for a long time but the following should work: Edit /etc/hosts.allow and add:
About restricting the telnet login ability to a single user check the following answer: http://serverfault.com/questions/36322/how-can-i-use-pam-to-restrict-telnet-login-by-user You can define the user shell so that a specific application is invoked during login, but please note that depending on the application or shell profile there could be workarounds to manually escape to a full shells. |
|||
|
|
|
You could manage all of this with iptables. As long as your default INPUT rules were not allow everything this would work. /sbin/iptables -A INPUT -p tcp --dport 23 -s IP_ADDRESS -j ACCEPT /sbin/iptables -A INPUT -p tcp --syn --dport 23 -m connlimit --connlimit-above 1 -j REJECT |
|||
|
|