This is a discussion on IP Tables Configuration within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi All , We are using Fedora Core 2.0 , now i want to block all the ports accept 443 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi All ,
We are using Fedora Core 2.0 , now i want to block all the ports accept 443 , 23,22,80 from iptables , i have made configure that every icmp traffic is block but want to configure to block all the ports ... please help ,,, John |
| Sponsored Links | ||
|
|
|
|||
|
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 23 -m state --state NEW -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT iptables -t filter -A INPUT -m state --state NEW -j DROP The above will accept incoming connections to the destination ports you specified. If this was for a firewall machine then you'd want to add the above substituting FORWARD for INPUT. iptables processes rules from the top down. I.E. traffic destined for ports other than the ones specified will catch on the drop rule. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Routing tables flushed | milank | Linux hardware | 3 | 12-24-2007 12:51 PM |
| Routing Tables flushed | milank | CentOS / RHEL / Fedora | 0 | 11-06-2007 12:26 AM |
| Delete all tables mysql under Linux | jerry | Databases servers | 1 | 06-09-2007 06:50 PM |
| PhpmyAdmin-Can browse/search some tables, but not others | blinton25 | Databases servers | 1 | 06-09-2007 12:28 AM |
| How to List my tables in Oracle database | Databases servers | 3 | 12-20-2006 04:25 PM | |