+ Post New Thread
Results 1 to 2 of 2
*nix Thread, iptables multiple ports in Technical; Ive got a line in my iptables rules file thats Code: -A PREROUTING -p tcp -m tcp -i eth1 --dport ...
  1. #1

    Join Date
    Jan 2007
    Durham, UK
    Thank Post
    Thanked 17 Times in 12 Posts
    Rep Power

    iptables multiple ports

    Ive got a line in my iptables rules file thats
    -A PREROUTING -p tcp -m tcp -i eth1 --dport 80 -j REDIRECT --to-ports 3128
    This is to redirect requests to the transparent proxy, i want to send all requests apart from https and ssh to the proxy so i tried this
    -A PREROUTING -p tcp -m tcp -i eth1 ! --dport 443,22 -j REDIRECT --to-ports 3128
    But it seems like iptables doesnt like the comma there, is that supposed to be set out like that or is it supposed to be different.


  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    East Lancs
    Thank Post
    Thanked 286 Times in 263 Posts
    Rep Power

    Re: iptables multiple ports

    Use something like shorewall to sort your IPTables. It will save you a lot of frustation in the end.

+ Post New Thread

Similar Threads

  1. USB Ports asking for Admin Account
    By Psymon in forum Windows
    Replies: 16
    Last Post: 14th October 2007, 11:49 PM
  2. Opening Ports for Citrix Access
    By AnnDroyd in forum Thin Client and Virtual Machines
    Replies: 8
    Last Post: 3rd October 2007, 08:59 AM
  3. Listening Ports
    By Samson in forum *nix
    Replies: 1
    Last Post: 2nd April 2007, 02:34 PM
  4. wsus default ports
    By russdev in forum Windows
    Replies: 12
    Last Post: 15th November 2005, 12:29 PM
  5. Setting up NAT using IPTABLES
    By ChrisH in forum *nix
    Replies: 23
    Last Post: 9th November 2005, 02:54 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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