Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Thank you both for your help, I've got exactly what I needed out of iptables for now. Regards...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Nov 2007
    Posts
    6

    Thank you both for your help, I've got exactly what I needed out of iptables for now.

    Regards

  2. #12
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by chemist View Post
    Thanks a lot! That worked straight off I might be pushing my luck here but how would I achieve the same result from a range of IP's?


    Regards, Chemist
    Glad that worked for you.

    As to the IP range would that be something like 192.168.1.0-192.168.1.50

    Code:
    iptables -t nat -A PREROUTING -p tcp -s 192.168.1.0:192.168.1.50 --dport 80 -j DNAT --to-destination <serverIP>:22
    To make a continues range you use ':' between the first and last IP Address.
    Same goes for ports, say 6667 to 6669 would be '6667:6669'

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #13
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    And as I said.
    LazyDog has a easyer/Quicker solution
    New Users, please read this..
    Google first, then ask..

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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