Find the answer to your Linux question:
Results 1 to 3 of 3
Hi there, I want to use below command in my firewall. Actually -t nat should be my own function. iptables -t nat -A POSTROUTING -j ACCEPT -o $INT_IF -d $INT_NET ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2

    iptables question


    Hi there,
    I want to use below command in my firewall. Actually -t nat should be my own function.
    iptables -t nat -A POSTROUTING -j ACCEPT -o $INT_IF -d $INT_NET

    I want to specify two subnets following -d. And these two subnets must be excluded. I know "-d ! 192.168.2.0/24" works. But now I want two subnets excluded. When I tried "-d ! 192.168.2.0/24 && ! 192.168.1.0/24", it can't work.

    Please help guys. I have been searched for a long time, still can't figure it out.

    Thank you very much!

    Lou

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Try using two rules - one for each subnet.

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2
    Thanks!!!
    I tried. But because of my own function(not -t nat), I must use only one rule.

    Any other help?
    Thanks!

    Lou

  4. $spacer_open
    $spacer_close

Posting Permissions

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