+ 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
    Location
    Durham, UK
    Posts
    329
    Thank Post
    33
    Thanked 17 Times in 12 Posts
    Rep Power
    14

    iptables multiple ports

    Ive got a line in my iptables rules file thats
    Code:
    -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
    Code:
    -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.

    Jack

  2. IDG Tech News

  3. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,810
    Thank Post
    89
    Thanked 212 Times in 195 Posts
    Rep Power
    83

    Re: iptables multiple ports

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

SHARE:
+ Post New Thread

Similar Threads

  1. USB Ports asking for Admin Account
    By Psymon in forum Windows
    Replies: 16
    Last Post: 14th October 2007, 10:49 PM
  2. Opening Ports for Citrix Access
    By jwood in forum Thin Client and Virtual Machines
    Replies: 8
    Last Post: 3rd October 2007, 07:59 AM
  3. Listening Ports
    By Samson in forum *nix
    Replies: 1
    Last Post: 2nd April 2007, 01: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
  •