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
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- 1 Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 1.4K LFS258 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 946 Programming and Development
- 310 Kernel Development
- 618 Software Development
- 978 Software
- 370 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 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)