diff --git a/haproxy/files/haproxy_config b/haproxy/files/haproxy_config new file mode 100644 index 0000000..d275ead --- /dev/null +++ b/haproxy/files/haproxy_config @@ -0,0 +1,38 @@ +global + log 127.0.0.1 local2 + + maxconn 4000 + user haproxy + group haproxy + daemon + + stats socket /var/lib/haproxy/stats + +defaults + mode http + log global + timeout queue 1m + timeout connect 10s + timeout client 5m + timeout server 5m + maxconn 3000 + +frontend ssh + mode tcp + bind 192.168.122.62:22 + + default_backend ssh + +frontend http + mode tcp + bind 192.168.122.62:80 + + default_backend http + +backend ssh + mode tcp + server localhost 127.0.0.1 + +backend http + mode tcp + server localhost 127.0.0.1 diff --git a/haproxy/pkg.sls b/haproxy/pkg.sls index 6f44ffc..1d9b2c9 100644 --- a/haproxy/pkg.sls +++ b/haproxy/pkg.sls @@ -15,6 +15,15 @@ haproxy_pkg_conf_dir: - require: - haproxy_pkg_pkgs +haproxy_pkg_config: + file.managed: + - name: /etc/haproxy/haproxy.cfg + - user: root + - group: root + - mode: '0644' + - require: + - haproxy_pkg_pkgs + haproxy_pkg_rc_script: file.managed: - name: /etc/init.d/haproxy @@ -28,3 +37,4 @@ haproxy_pkg_rc_script: - mode: '0755' - require: - haproxy_pkg_conf_dir + - haproxy_pkg_config diff --git a/openssh/files/openssh_sshd_config b/openssh/files/openssh_sshd_config index 5ae71a1..7595638 100644 --- a/openssh/files/openssh_sshd_config +++ b/openssh/files/openssh_sshd_config @@ -18,9 +18,9 @@ Include /etc/ssh/sshd_config.d/*.conf # SELinux about this change. # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER # -#Port 22 +Port 22 #AddressFamily any -#ListenAddress 0.0.0.0 +ListenAddress 127.0.0.1 #ListenAddress :: #HostKey /etc/ssh/ssh_host_rsa_key