Find the answer to your Linux question:
Results 1 to 2 of 2
Hello! I have the following problem with iptables in Debian 6: My server works as a router and it needs to log server external IP+port for all outgoing connections. But ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    1

    Question iptables: log connection after SNAT/MASQUERADE command


    Hello!

    I have the following problem with iptables in Debian 6:

    My server works as a router and it needs to log server external IP+port for all outgoing connections.

    But after command SNAT or MASQUERADE traffic is "lost".
    I mean no following rules can catch those traffic.
    Everything looks like SNAT/MASQUERADE is the "end" rule and it pushes traffic to network immediately.

    Question:

    How can I log routed connection data with server external IP and port?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Have a look at LOGging in IPTAVLES to log the packets before SNAT/MASQ.

    IPTABLES LOGTARGET

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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