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
- 179 LFX Mentorship
- 179 LFX Mentorship: Linux Kernel
- 778 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 76 DevOps IT Professional Program - Discontinued
- 8 DevOps & GitOps IT Professional Program
- 104 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 21 AI & ML Training
- 2 Blockchain & Decentralized Identity Training
- 54 Cloud & Containers Training
- 7 Cybersecurity Training
- 5 DevOps & Site-Reliability Training
- 3 Linux Kernel Development Training
- 3 Networking Training
- 2 Open Source Best Practice Training
- 12 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 799 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 97 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 776 Linux Distributions
- 83 Debian
- 68 Fedora
- 25 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 474 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 104 Linux Security
- 79 Network Management
- 102 System Management
- 47 Web Management
- 194 Mobile Computing
- 32 Android
- 146 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 409 Off Topic
- 129 Introductions
- 36 Study Material
- 1.1K Programming and Development
- 312 Kernel Development
- 740 Software Development
- 1K Software
- 421 Applications
- 183 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)