IPTables on Amazon Linux AMI for LAMP

IPTables on Amazon Linux AMI for LAMP

We will be using “Easy Firewall Generator for IPTables” by morizot.net to create our IPTables script.

screenshot-1362638958

  1. Go to: http://easyfwgen.morizot.net/gen/
  2. Select the following on the first screen:
    1. Static Internet IP Address
    2. Allow Inbound Services
    3. Log entries in a Fireparse format?
  3. The second screen will be the same with a couple extra options. Fill in the following:
    1. Static Internet IP Address: Your internal AWS IP (starts with “10.”)
    2. SSH: checked
    3. Web Server and “with SSL”: both checked
  4. SSH into your instance.
  5. Copy the script contents into a new file on the server called iptables.
    vim ./iptables
  6. Next we replace the existing iptables script and set permissions.
    chmod +x ./iptables
    mv -f ./iptables /etc/init.d/iptables
    chkconfig --level 235 iptables on
    

If you are unsure about the iptables script, you can execute the script before running the chkconfig. After executing, open a new terminal window and confirm you can still connect. If not, you can just reboot and start fresh.

Short URL: http://bit.ly/10ADOiL

1 Comment

  1. Mohamid · August 28, 2015 Reply

    Might wanna check out some anti-virus and anti-spyware software along with a cuploe other recommended programs:-McAfee 12 in 1 Security Center (anti-virus)or AVG if you want a free program-Spyware Doctor with AV (anti-spyware)or Spybot S&D if you want a free program-PC Tools Firewall Plus(free) (firewall)-ThreatFire(free) (added virus protection)-CCleaner(keep computer running pretty good, cleans up history and whatnot)-Firefox(safe browser)All of the above programs(aside AVG and Spybot) I use and have been using for a very long time now, all with fantastic results. For AVG and Spybot they are both good in the way of free protection but McAfee and Spyware Doctor are recommended.

Leave a reply