iptables for HAProxy on Debian Jessie

Trying to use HAProxy for 4 of Backend Webserver

 

# Generated by iptables-save v1.4.21 on Fri May  5 17:59:07 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp –dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 443 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m iprange –src-range 192.168.103.100-192.168.103.200 -m tcp –dport 22 -j ACCEPT
-A INPUT -p icmp -m icmp –icmp-type 8 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-port-unreachable
-A FORWARD -j REJECT –reject-with icmp-port-unreachable
-A OUTPUT -j ACCEPT
COMMIT
# Completed on Fri May  5 17:59:07 2017

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.