Results 1 to 7 of 7

Thread: iptables firewall doesn't work

  1. #1
    Join Date
    Sep 2006
    Beans
    90

    iptables firewall doesn't work

    this firewall should block ssh access, but i am still able to conect to ssh, why?

    # Generated by iptables-save v1.3.1 on Sun Apr 23 06:19:53 2006
    *filter
    :INPUT ACCEPT [368:102354]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [92952:20764374]
    -A INPUT -i lo -j ACCEPT
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
    -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
    -A INPUT -j DROP
    COMMIT
    # Completed on Sun Apr 23 06:19:53 2006

  2. #2
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,721
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

  3. #3
    Join Date
    Sep 2006
    Beans
    56

    Re: iptables firewall doesn't work

    If you don't want people to connect to your computer via ssh, you should disable the daemon service or you could add the following.

    Code:
    iptables -A INPUT -p tcp --dport ssh -j DROP

    If you don't want people on your computer to connect to other computers via ssh, you could add

    Code:
    iptables -A OUTPUT -p tcp --dport ssh -j DROP
    Ubuntu 12.04. 64bit. Desktop version. Gnome 3.4.1 O͜͡.O~

  4. #4
    Join Date
    Sep 2006
    Beans
    90

    Re: iptables firewall doesn't work

    but firewall should block everything unless acess to http pages, wright or wrong?

    but as it is now it allow to connect to everything

  5. #5
    Join Date
    Mar 2007
    Beans
    212

    Re: iptables firewall doesn't work

    The default settings of iptables is to allow everything. It has to be configured to block what ever you want to block.

  6. #6
    Join Date
    Sep 2006
    Beans
    90

    Re: iptables firewall doesn't work

    but the firewall above should block everything , and allow just conections to port 80

  7. #7
    Join Date
    Sep 2006
    Beans
    56

    Re: iptables firewall doesn't work

    From your iptables output, I can tell that you just copied and pasted it without actually understanding it. If you look at your policies, you will noticed that it is set to accept.
    Ubuntu 12.04. 64bit. Desktop version. Gnome 3.4.1 O͜͡.O~

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •