Welcome to the Linux Foundation Forum!
hosts.allow question
keisangi
Posts: 1
hi there,
i have a basic question about general use of /etc/hosts.allow
is it possible to have multiple lines for the same protocol ?
right now i have 1 line for vsftpd like:
vsftpd: xxx1 , xxx2, xxx3 : allow
(where xxx1,2 and 3 are IP i want to allow)
it works but its easy to forget which ip belong to who ..
i'd like to do like this if its possible:
# john doe
vsftpd: xxxx1 : allow
# smith
vsftpd: xxxx2 : allow
# michael
vsftpd: xxxx3 : allow
is it possible ?
0
Comments
-
I do personally have no clue but you can always read the manual for hosts.allow either by typing
man hosts.allow
or visiting this site: http://linux.die.net/man/5/hosts.allow0 -
I'm going to take a stab in the dark here, please correct me if im wrong. I want to test my knowledge, without doing any research . You would like to solve the following issue : forgetting which IP belongs to specific Nodes..
Would the following syntax work? Doesn't the semicolon break the line then allow you to write notes behind it?# IP Addresses Names vsftpd: 12.34.56.78 ; John 12.34.56.79 ; Roger :allow
Or maybe something like that to If the above doesn't work. and if you had mulitple lines you would start a second line of names.# John Roger # Chris Same vsftpd: 12.34.56.78, 12.34.56.79
Technically you could have multiple lines because say you have 20 IP's that you need to allow. They all wouldn't fit on one line. So it would end up looking like this.
vsftpd: 12.34.56.78, 12.34.56.79, 12.34.56.78, 12.34.56.79,12.34.56.78, 12.34.56.79, 12.34.56.78, 12.34.56.79, 12.34.56.78, 12.34.56.79,12.34.56.78,
12.34.56.79, 12.34.56.78, 12.34.56.79 : allow
But that's just taking a stab in the dark... I would say, make a back up of the file and play around with it. If you get a syntax error then you know you can't do it.0
Categories
- All Categories
- 178 LFX Mentorship
- 178 LFX Mentorship: Linux Kernel
- 773 Linux Foundation IT Professional Programs
- 383 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 102 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 9 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 29 Cloud & Containers Training
- 3 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 2 Networking Training
- 2 Open Source Best Practice Training
- 5 System Administration Training
- 1 System Engineering Training
- 4 Web & Application Development Training
- 798 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 771 Linux Distributions
- 81 Debian
- 68 Fedora
- 23 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 469 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 101 Linux Security
- 79 Network Management
- 101 System Management
- 46 Web Management
- 151 Mobile Computing
- 20 Android
- 116 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 404 Off Topic
- 126 Introductions
- 34 Study Material
- 1K Programming and Development
- 310 Kernel Development
- 717 Software Development
- 1K Software
- 416 Applications
- 182 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)