Hello,
I have recently setup an installation of ubuntu and have been attempting to set some rules using an iptables.rules file that is loaded upon boot.
The configuration I have allows my ssh connections & will also allow my pc to access via port 80 for my website when pageant is running. However if I reboot my pc or use my apple laptop I am not able to establish a connection when my full iptables configuration is in place. When I disable the iptables setup & reboot the ubuntu installation I can establish a connection so I know for sure it is my configuration that is not correct.
I am a little new to setting up iptables & can not figure out what is wrong here & need some advice from people more experienced. I have allowed port 80 connections but it is still blocking with my current configuration.
Here is what is in my iptables.rules file:
Code:
*filter
-A INPUT -i lo -p all -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -p tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 8001,8002,8003,8004,8005,8006,8007,8008,8009,8010 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 56325 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 10852 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -j REJECT
-A FORWARD -j REJECT
COMMIT
Somehow the rule is not being tripped because it just rejects a regular connection. The connection to my site can be established when my pageant is running but that should only be for ssh on the example ports shown above (56325 & 10852) & not anyone's regular connection. Port 22 is disallowed as I use the example 56325 for my terminal.
Any ideas on what I have misconfigured?
Thank you.
Bookmarks