Jump to content

omniomi

Member
  • Posts

    242
  • Joined

  • Last visited

Awards

This user doesn't have any awards

2 Followers

About omniomi

  • Birthday August 23

Profile Information

  • Gender
    Male
  • Location
    Canada
  • Occupation
    Systems Administrator

System

  • CPU
    Intel i7-4770
  • Motherboard
    MSI Z97
  • RAM
    32GB Kingston DDR3 PC12800
  • GPU
    GeForce GTX 770
  • Storage
    120 GB Samsung SSD, 2x2TB WD Mechanical
  • Display(s)
    27" LG IPS Primary Monitor, 23" LG IPS Secondary Monitor
  • Keyboard
    Logitech G710+ Mechanical
  • Mouse
    Razer Naga
  • Sound
    Astro A50 Wireless Headset
  • Operating System
    Windows 10 Pro
  1. Off topic; However, The AD Domain Name and the DNS name of the domain are two separate things. Ie, if you are Company Inc. with the website www.company.com you might call your AD domain "CORP" with the DNS name corp.company.com. Users would have the down-level logon name of CORP\Username and a UPN of username@corp.company.com or similar. Typically when binding to Active Directory you will use the full DNS name of the domain as OP showed in their screenshot. Now, it is possible for your domain to be "Company" with the DNS name of "company.com" but that is considered to be against best practices due to issues such as split brain DNS and administrators who configure their domains that way typically end up regretting it. You can also do things like "company.local," "company.dom," etc but that is less common. A sub-domain of the company's public website domain is the most common and within best practices; It is also cleaner in multi-domain setups where you may have corp.company.com, prod.company.com, dev.company.com, etc. As OP is a student and this is for a project he should be following real world configuration. Clients should use the local DNS servers exclusively for DNS they [the DNS servers] should resolve anything for which they're not authoritative. Setting up root hints on the DNS server(s) is ideal but forwarders can be used if absolutely necessary.
  2. While the DigitalOcean guide is really good for specifically setting up Wordpress it's missing a lot of the web server specific stuff. There's an interesting anecdote in security that you're more likely to get malware form a church website than a porn site. The reason is the church website was more likely setup by a well meaning parishioner's tech inclined kid and not a professional thus is likely not hardened sufficiently. Guides like the Digital Ocean guide are precisely the types of guides followed by those well meaning folks that don't go far enough to protect the sites from attack and abuse. Before you even install Apache: The DO guide touches on this but: Create a new non-root user and never daily drive as root. - adduser myuser - adduser myuser sudo or usermod -a -G sudo myuser depending on version. Log out of the server and log back in using your new user. Disable root login over SSH. - Edit /etc/ssh/sshd_config - Change PermitRootLogin to no - sudo systemctl restart sshd Ideally you should also setup Key-Pair authentication and disable PasswordAuthentication but that's up to you. Stop sshd from listening over anything other than IPv4 unless you need it to. - echo 'AddressFamily inet' | sudo tee -a /etc/ssh/sshd_config - sudo systemctl restart sshd Install and configure a firewall like iptables. - Once installed create a file called /etc/iptables.rules with this content: *filter # Allow all loopback (lo0) traffic and drop traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # Accept all established inbound connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow all outbound traffic -A OUTPUT -j ACCEPT # Allow HTTP and HTTPS connections -A INPUT -p tcp --dport 80 -j ACCEPT -A INPUT -p tcp --dport 443 -j ACCEPT # Allow SSH connections -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT # Allow ping (optional) -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT # Log iptables denied calls (optional) -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 # Reject all other inbound - default deny unless explicitly allowed policy -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT - Activate the rules using sudo iptables-restore < /etc/iptables.rules - Verify using sudo iptables -L - Create /etc/network/if-pre-up.d/firewall and add #!/bin/sh /sbin/iptables-restore < /etc/iptables.rules - sudo chmod +x /etc/network/if-pre-up.d/firewall Install fail2ban and configure it in /etc/fail2ban/jail.conf After installing Wordpress: Wordpress is the most popular CMS on the internet especially among amateur web masters so it is also the most attacked. Even web servers with no Wordpress installs will see bots probing for wordpress vulnerabilities every hour of every day... It's your job to secure it to the best of your ability: Enable 2FA for Wordpress https://codex.wordpress.org/Two_Step_Authentication Use the recommended permissions for Wordpress (Folders - 755, Files - 644) and never use 777. - find /path/to/wordpress/ -type d -exec chmod 755 {} \; - find /path/to/wordpress/ -type f -exec chmod 644 {} \; Add BasicAuth to the /wp-admin/ directory (.htpasswd) and/or restrict the /wp-admin/ directory to your IP addresses. Google for guides. Deny php execution in the wp-content/Uploads directory. - Create an .htaccess file at the root of the Uploads directory and add <Files ~ "\.ph(?:p[345]?|t|tml)$"> deny from all </Files> This can stop some themes from working ... I wouldn't use those themes. Turn off file editing in wp-config.php by setting define('DISALLOW_FILE_EDIT', true); Ongoing: Keep the operating system, Apache, MySQL, etc up to date. Keep Wordpress and any addons up to date. Do not install addons from untrusted sources. They're the most common source of vulnerabilities. Constant monitoring: If you notice weird files in your Wordpress directories, posts/content you didn't add, etc deal with it immediately. Do not install FTP on the server, you don't need it... Use SFTP / SCP over port 22 instead. No extra installs needed... In a client like WinSCP select "SFTP" as the protocol and it will just work.
  3. Mac OS X (based on BSD Unix): grep LOTR /usr/share/calendar/calendar.history FreeBSD: calendar -f /usr/share/calendar/calendar.lotr annnnd Debian: cat /usr/share/calendar/calendar.lotr
  4. Personally I'd say no... I think a central Plex server with Chromecasts makes more sense. With a single Plex server in our home office we're able to access our content on both of our TVs, both of our tablets, our phones, and so on. For content like YouTube/Crunchyroll/Netflix/etc we use Chromecast support directly inside their apps. Having a single computer directly attached to a single TV seems silly with all of the streaming media devices on the market and mobile devices in the average home.
  5. Robocopy is the way to go: robocopy "f:\" "g:\f-backup" /mir /Z /r:1 /log+:c:\logs\f-backup.txt Will mirror f:\ to "g:\f-backup" >> "f:\" "g:\f-backup" /mir Will resume large files if connection is lost mid-stream >> /Z Will retry once if it fails after waiting 30 seconds >> /r:1 Will log to c:\logs\f-backup.txt >> /log+:c:\backup\logs\f-backup.txt Put that in a bat file in c:\backup and create a task to run daily and invoke that batch file OR you can invoke robocopy directly:
  6. While scanning for malware isn't ever a bad idea svchost.exe processes can be legitimately used by services like BITS and wuauserv to access the internet. There are other services that may use svchost processes and need internet access but those are the two most common. Open the Task Manager. Go to the Processes tab. Show processes from all users. Right-click the various svchost.exe processes. Select go-to services. Any highlighted services are using that svchost process. Google the service names or open services.msc and read their descriptions. AND Still on the Processes tab of Task Manager click View on the menu bar. Click Select Columns. Add the Image Path Name and Command Line columns. Expand those columns on the Processes tab. Check the svchost.exe processes for irregular path names or command line switches. They should all be c:\Windows\System32\svchost.exe and the command line switches should invoke services or service groups such as "c:\Windows\system32\svchost.exe -k netsvcs" I would bet money there is nothing wrong with your machine. Malware scans will find one or two tracker cookies like they always do which had anything to do with the pop-up you got. "Svc" in "SvcHost" stands for "service" as in "Service Host." svchost.exe processes are literally hosts for the various services in services.msc a good number of which talk to things like Microsoft servers over the internet. While it's true that some malware and viruses will disguise themselves as svchost.exe processes it's far more likely you blocked some component of Windows Update or the Microsoft Store.
  7. Yeah no worries. Just PM me if you need anything.
  8. <head> can be ommitted in specific circumstances in HTML5 which was specified in the doc type: <!DOCTYPE html> A head element's start tag may be omitted if the element is empty, or if the first thing inside the head element is an element. A head element's end tag may be omitted if the head element is not immediately followed by a space character or a comment. His code snipped met the requirement "is empty" as there were no tags in the head.
  9. It's in the introduction "Make sure to execute the fsck on an unmounted file systems to avoid any data corruption issues." which is why I didn't mention it but good point. Didn't know that about Arch.
  10. Besides checking the SMART status you should also check the file system itself which is done with FSCK (file system consistency check.) http://www.thegeekstuff.com/2012/08/fsck-command-examples/
  11. Don't use Wordpress... Theme development for Wordpress is a pain in the butt and Wordpress is notorious for insecurities and bloat. Use Concrete5; it's seriously the easiest CMS to theme for and it's light weight. If this is your html file: <!DOCTYPE html><html><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="css/styles.css"><title>My Title</title><body><div class="container"> <h1>My Site</h1> <p>My Site!</p> <div class="sec-third"> <h2>Section</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus malesuada dolor quis dictum. In id libero lacus. Maecenas porttitor, elit eu venenatis consequat, tortor sapien gravida odio, id maximus quam est non neque. Sed pharetra nec tellus eget efficitur. In a arcu id quam pellentesque interdum at eu nisl. Morbi velit eros, bibendum et magna hendrerit, cursus hendrerit arcu.</p> </div> <div class="sec-third"> <h2>Section</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus malesuada dolor quis dictum. In id libero lacus. Maecenas porttitor, elit eu venenatis consequat, tortor sapien gravida odio, id maximus quam est non neque. Sed pharetra nec tellus eget efficitur. In a arcu id quam pellentesque interdum at eu nisl. Morbi velit eros, bibendum et magna hendrerit, cursus hendrerit arcu.</p> </div> <div class="sec-third"> <h2>Section</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus malesuada dolor quis dictum. In id libero lacus. Maecenas porttitor, elit eu venenatis consequat, tortor sapien gravida odio, id maximus quam est non neque. Sed pharetra nec tellus eget efficitur. In a arcu id quam pellentesque interdum at eu nisl. Morbi velit eros, bibendum et magna hendrerit, cursus hendrerit arcu.</p> </div></div></body></html> This is the C5 template: <!DOCTYPE html><html><head> <?php Loader::element('header_required') <link rel="stylesheet" href="<?php echo $view->getThemePath()?>/css/styles.css"></head><body><div class="<?php echo $c->getPageWrapperClass()?>" style="height:100%;"><div class="container"> <?php $a = new Area('Main'); $a->display($c); ?> <div class="sec-third"> <?php $a = new Area('Section 1'); $a->display($c); ?> </div> <div class="sec-third"> <?php $a = new Area('Section 2'); $a->display($c); ?> </div> <div class="sec-third"> <?php $a = new Area('Section 3'); $a->display($c); ?> </div></div></div><?php Loader::element('footer_required')?></body></html> The 22 minute video on this page is literally all you'll need to get started: http://documentation.concrete5.org/developers/designing-for-concrete5/building-a-concrete5-theme/converting-an-html-template-to-a-concrete5-theme You can have it handle auto nav creation so users can add pages and it will automatically add them to the menu. Users can add elements like photo galleries, surveys, polls, Google maps, and so on all drag and drop: https://i.imgur.com/LFbr7qD.png https://i.imgur.com/ujEDJoW.png https://i.imgur.com/ngJWpt1.png https://i.imgur.com/BPazOZl.png I've converted a number of sites to c5 for people such as http://woodsalehouse.com/ which is a bootstrap single-page site, and this one for a friend: http://www.ellissentials.com/ . Both took less than an hour and now they can edit their own sites without bugging me. The homepage template for ellissentials.com looks like this: http://pastebin.com/BjHKyb1f the included header.php looks like this: http://pastebin.com/rpxdbGNQ and this is the footer.php http://pastebin.com/5mNFkmjk Hell.. if you send me the source I can do it for you lol.
  12. The configuration of an SMTP server in php.ini is only required on Windows; However, you do need sendmail installed to send mail using PHP on Linux.
  13. Regex is a pain in the butt; Super useful (and necessary) if you're going into programming or systems administration though so worth learning regardless of what you want to do in IT.
  14. ^[0-9]+$ breaks down as such: ^ the beginning of the string. [0-9] matches characters in the numeric range 0-9. + allows for between 1 match and unlimited matches (so 1, 12, 111, 114551, etc would all match.) $ the end of the string. Without the + it would only accept 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0. With the plus it can be any length of number. All of the characters must of course be numbers (11n66 would not match.) If you need to allow decimal places it would be ^[0-9]+([.][0-9]+)?$
  15. Regex... Which is probably the purpose of the assignment. https://en.wikipedia.org/wiki/Regular_expression #!/bin/bashecho Enter value one:read valueOneecho Enter value two:read valueTwoif ! [[ $valueOne =~ ^[0-9]+$ ]]; then echo $valueOne "is not a number"fiif ! [[ $valueTwo =~ ^[0-9]+$ ]]; then echo $valueTwo "is not a number"fi omniomi@bitch:~$ ./test.shEnter value one:aEnter value two:fa is not a numberf is not a numberomniomi@bitch:~$ ./test.shEnter value one:sEnter value two:2s is not a numberomniomi@bitch:~$ ./test.shEnter value one:1Enter value two:2omniomi@bitch:~$ ./test.shEnter value one:12Enter value two:13
×