LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   firewall question (https://www.linuxquestions.org/questions/linux-networking-3/firewall-question-350329/)

graziano1968 08-05-2005 01:15 PM

firewall question
 
on windows xp , if you have installed a firewall such as kerio , norton (others) if a new software attempts to connect to internet the firewall tell you on which port is trying to connect . With linux is there some software which could advice me in a similar way ?

thank you

david_ross 08-05-2005 01:36 PM

You can see which connections are being made to your machine with:
netstat -an

To log the requests that are made and blocked add a logging rule to your iptables rule set.

graziano1968 08-06-2005 02:05 AM

Quote:

To log the requests that are made and blocked add a logging rule to your iptables rule set.
this could be very useful for me ! Can you tell me how to that ?

Thank you!

david_ross 08-06-2005 08:41 AM

The iptables man page has the details:
Code:

  LOG
      Turn on kernel logging of matching packets.  When this  option  is  set
      for  a rule, the Linux kernel will print some information on all match-
      ing packets (like most IP header fields) via the kernel log  (where  it
      can be read with dmesg or syslogd(8)).  This is a "non-terminating tar-
      get", i.e. rule traversal continues at the next rule.  So if  you  want
      to  LOG  the  packets  you refuse, use two separate rules with the same
      matching criteria, first using target LOG then DROP (or REJECT).

      --log-level level
              Level of logging (numeric or see syslog.conf(5)).

      --log-prefix prefix
              Prefix log messages with the specified prefix; up to 29  letters
              long, and useful for distinguishing messages in the logs.

      --log-tcp-sequence
              Log  TCP sequence numbers. This is a security risk if the log is
              readable by users.

      --log-tcp-options
              Log options from the TCP packet header.

      --log-ip-options
              Log options from the IP packet header.

      --log-uid
              Log the userid of the process which generated the packet.



All times are GMT -5. The time now is 01:08 AM.