Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    iptables forward for specific ip


    I have a situation and I could't find anything to help me on the internet. I'm new to this and maybe I'm asking stupid things.

    I need to find a way to forward port 80 to another server, but only from a list of IP.
    Simple forwarding works, but I need to be able to access 192.168.0.2 only from a list of specific IP, on different ports. I have the same problem with ssh, because I need to find a way to block connections attempts on port 22 from unknown IP.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,798
    Is this list of IP's in seq order or random ip addresses?
    Have you looked at port knocking for your SSH connections?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Quote Originally Posted by Lazydog View Post
    Is this list of IP's in seq order or random ip addresses?
    Have you looked at port knocking for your SSH connections?
    The ip list is random and it's about 4 or 5 public addresses.
    I don't know what is port knocking, I have to google it.
    Quote Originally Posted by Lazydog View Post
    Is this list of IP's in seq order or random ip addresses?
    Have you looked at port knocking for your SSH connections?
    The ip list is random and it's about 4 or 5 public addresses.
    I don't know what is port knocking, I have to google it. My distro is Centos

    Sent from my HTC One M8s using Tapatalk

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,798
    -->
    For the IP Addresses you could setup individual rules for each one or take a look at ipset.

    Port knocking is were you have to touch certain ports in order before the firewall will open port 22 for your ip address. Then you touch the port in reverse order to close port 22 once again.

    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
  •