Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# hostname
avalon.dev
# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 avalon.dev

...

Configure iptables 
Anchor
iptables
iptables

...

The Avalon Media System requires several ports to be open to client browsers.

Here are the port settings that will need to be configured:

PortPurposeExternal?
80HTTP (Avalon)Yes
1935RTMP (red5)Yes
5080HTTP (red5)No
8983HTTP (Fedora/Solr)No
18080HTTP (Matterhorn)Yes

 

The preferred method is to create a shell script that will do the work for you. Here is an example script:

Code Block
#!/bin/bash
#
# Flush all current rules from iptables
iptables -F

# Set rules
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
for n in 22 80 1935 18080;
do
        iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport $n -j ACCEPT
done
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
iptables -A FORWARD -j REJECT --reject-with icmp-host-prohibited


# Backup previous settings
iptables-save > /etc/sysconfig/iptables.prev
# These settings can be retreived with the following command:
# iptables-recover /etc/sysconfig/iptables.prev
 
# Save settings
/sbin/service iptables save


# Restart iptables service so the new settings can take effect
service iptables restart


# List rules
echo "New rules:"
iptables -L -v

Save your script to /etc/sysconfig/avalon-iptables-config.sh, make it executable and run it.

Code Block
chmod +x /etc/sysconfig/avalon-iptables-config.sh
/etc/sysconfig/avalon-iptables-config.sh

Disable SELinux

Code Block
echo 0 > /selinux/enforce 
vim /etc/selinux/config #change the value of `SELINUX` from `enforcing` to `permissive`

...