LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-02-2018, 02:13 AM   #31
YesItsMe
Member
 
Registered: Oct 2014
Posts: 915

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313

There is no need to over-optimize everything. Just wait.
 
Old 01-02-2018, 02:14 AM   #32
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Yes,
Ok wait mean when to decide to optimise ? What to monitor ? How about security and protection on the nginx?
 
Old 01-02-2018, 02:15 AM   #33
YesItsMe
Member
 
Registered: Oct 2014
Posts: 915

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Security and protection mostly comes from your OS, not from the web server.

"What to monitor": TCP load should be good.
 
Old 01-02-2018, 02:23 AM   #34
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Yes,
Can I just run the top command and get this monnitoring done? I mean what commands to use to monitor like benchmarking or comparing it ? The load is it he 3 values ? So I am using centos 7 I do regular updates and using minimal installation. What else you recommend for the security? For nginx is it worth for me to install mod_security does it help ?
 
Old 01-02-2018, 02:25 AM   #35
YesItsMe
Member
 
Registered: Oct 2014
Posts: 915

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
top/htop is adequate for watching the system load. Traffic measurements are more reliable with Nagios etc.

mod_* is for Apache. I'm pretty sure that this slowly becomes off topic though.
 
Old 01-02-2018, 02:26 AM   #36
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,306
Blog Entries: 3

Rep: Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720
Quote:
Originally Posted by newbie14 View Post
How about security and protection on the nginx?
nginx is fine. The weak part will be the PHP or more specifically whatever is written in PHP. If you can do without it your server maintenance, and thus security, will be better.

What kind of 'web app' do you have? Some of the most important things to look for are:
  • Always validate input before even considering it for use in the program. If your language supports a taint mode, use that too.
  • If you have a database backend, use parameterized queries (placeholders).
  • Write your programs according to the principle of least privilege.
  • Be sure your program does not leak debugging info to the public during errors.
  • Familiarize yourself with the web server logs.

There are other more specific recommendations depending on your program.
 
1 members found this post helpful.
Old 01-02-2018, 02:29 AM   #37
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Yes,
Do you suggest for me to install nagios on my current system or have separate system to monitor this ? Sorry I am asking some details though cause would like to harden on the nginx and get prepared earlier for circumstance e.g. ddos attacks etc.
 
Old 01-02-2018, 02:30 AM   #38
YesItsMe
Member
 
Registered: Oct 2014
Posts: 915

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You don't need to harden the web server software. The bottleneck is elsewhere as described by @Turbocapitalist above.

re:Nagios, please refer to the Nagios handbook.

Off to work - maybe someone else will fill in now.

Last edited by YesItsMe; 01-02-2018 at 02:31 AM.
 
Old 01-02-2018, 03:53 AM   #39
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Turbocapalist,
Ok about nginx I shall leave it then but I dont know when I google I find a lot of things on hardening and security. I will go with you suggestion on PHP. Yes my back is using PHP fully for both web and app. My web is basically linking to backend mysql db. The web server is facing the internet and db is always kept locally.
Regarding you suggestions.

Always validate input before even considering it for use in the program. If your language supports a taint mode, use that too. (Yes I am doing both using javascript and also at the PHP level)
If you have a database backend, use parameterized queries (placeholders).(Yes I have implemented on this too)
Write your programs according to the principle of least privilege. (Can you help me more on this)
Be sure your program does not leak debugging info to the public during errors. (I just show the normal errors but I dont know is that leaking or not)
Familiarize yourself with the web server logs.(I need more help on this I am trying to learn this)
 
Old 01-02-2018, 07:50 AM   #40
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
"Is this what they teach kids in school today?" To simply throw up your hands and ask vague questions, hoping that someone will give you the answers when you don't even know (yet) what to ask for?

Actually, I'm being serious.

Right now, you seem to have glommed-onto a handful of buzzwords, but you have no earthly idea how the pieces fit. You seriously need to s-t-o-p, and start doing some reading / video-watching in order to get an idea of what is the so-called "big picture" here. You need to acquire some rudimentary understanding of what a web-server and a mobile-app actually are, how they talk to one another (and for what purposes), and how existing apps already do this.

Simply hand-waving that you don't understand, won't get you any understanding. And, this self-education process won't be accomplished in a day. You must have a clear goal in mind ... and your first goal must be to determine what those goals ought to be.
 
1 members found this post helpful.
Old 01-02-2018, 01:28 PM   #41
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Sundia,
Ok let me be clear what currently I am doing.

1. My os is Centos 7
2. Php is Php 7
3. Mysql is Mysql 5.7

Currently there is two version one is the web app and the other is mobile app. I try to split the codes for both web and mobile app but both rely on php to connect to the backend db and send the results accordingly. Well I have done a number hardening on the centos box. I can share what are my steps done too.
 
  


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
LXer: Anatine (Pristine Twitter App) – Mobile web version of Twitter App for Linux Desktop LXer Syndicated Linux News 0 08-11-2016 07:00 AM
Web Monitoring Mobile App abhilashbsstabilix Linux - Mobile 2 08-09-2015 10:55 AM
When Deploying web app directory tomcat application server got hanged ? findnerd2 Linux - Software 1 06-20-2015 04:07 PM
How is splitting only a database server from the web server more secure? anthony01 Linux - Security 3 10-31-2012 02:12 PM
VPN access to web application from mobile workstations asphodel587 Linux - Networking 2 06-11-2010 09:22 AM

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

All times are GMT -5. The time now is 01:43 AM.

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