slackware linux , block LAN on all port ,except port 80 ?

Posted on 2006-04-09
Last Modified: 2013-12-05
my Lan is . how to block this LAN from accessing my slackware server on all port except port 80 only? I don't want to shut down other linux service like ssh because my other LAN is using it.

Question by:second_comet
    LVL 16

    Accepted Solution

    You can do this in iptables with some rules:

    iptables -A INPUT -s -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT -s -m state --state NEW -j DROP

    for more info on iptables rules see
    LVL 19

    Assisted Solution

    another form

    iptables -P INPUT DROP
    iptables -A INPUT -s -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT  -m state --state ESTABLISHED,RELATED -j ACCEPT

    this way you accept only port 80 and related connections.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now