Results 1 to 2 of 2

Thread: about Firewall services

  1. #1
    Join Date
    Mar 2006
    Beans
    88

    Question about Firewall services

    Dear Expert,

    currently i were using the Ubuntu 8.04 LTS Server Edition. so may i know :-

    1 ) how to find that the firewall service is active.
    2 ) how to find that the port 3306 is block.
    3 ) if the port 3306 is block how to unblock.

    Thank and please advice.

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: about Firewall services

    1. The "firewall service" (iptables) is always running. If there is a way to turn it besides recompiling the kernel, I don't know it. By default, it will allow everything, so you might consider that disabled.

    2. Use this command from another computer.
    Code:
    nmap <server ip> -p 3306
    You can also check your current rules
    Code:
    sudo iptables -L
    A default install that filters nothing will give this output
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    3. If you want to allow incoming traffic on TCP port 3306
    Code:
    sudo iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
    If you want to allow everything by clearing all rules
    Code:
    sudo iptables -P INPUT ACCEPT
    sudo iptables -P OUTPUT ACCEPT
    sudo iptables -P FORWARD ACCEPT
    sudo iptables -t nat -P PREROUTING ACCEPT
    sudo iptables -t nat -P POSTROUTING ACCEPT
    sudo iptables -t nat -P OUTPUT ACCEPT
    sudo iptables -F
    sudo iptables -t nat -F
    These changes will not be persistent if you have a service that loads pre-configured rules at boot time.

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
  •