Find the answer to your Linux question:
Results 1 to 5 of 5
i have 4 computers of address range.. PC1:10.0.0.2 PC2:10.0.0.1 PC3:10.1.0.1 PC4:10.1.0.2 how do i use iptables to prevent ip address of PC1 from pinging to PC4. thank you....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    1

    iptables to block ip address


    i have 4 computers of address range..
    PC1:10.0.0.2 PC2:10.0.0.1 PC3:10.1.0.1 PC4:10.1.0.2

    how do i use iptables to prevent ip address of PC1 from pinging to PC4.

    thank you.

  2. #2
    Just Joined!
    Join Date
    Feb 2006
    Posts
    1
    I believe its something like:

    iptables -A INPUT-p icmp -s 10.0.0.2 -d 10.1.0.2 -j DROP

    I might be wrong its been a while since I've used iptables, but give that a shot.

  3. #3
    Linux Newbie
    Join Date
    Jul 2004
    Posts
    143
    Hi,

    Implement this rule on PC4

    iptables -A INPUT -s 10.0.0.2 -p icmp --icmp-type echoo-request -j REJECT

    This prevents pinging to PC4 from PC1 but not vice versa.

    Regards,
    mummaneni

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    How To Set Iptables

    Dear Sir,

    I want to give a browsing rights to the m/c having ip address is 192.168.0.4 only the following sites.

    IP ADDRESS OF THE SITES ARE

    61.0.0.70
    203.90.124.66
    203.90.124.65

    How can I set a IPTABLES RULE

    PLEASE HELP ME

  6. #5
    Just Joined!
    Join Date
    Sep 2005
    Location
    New delhi
    Posts
    22
    We need further inputs ...
    1. At which box are you running your firewall ? (ip )
    2. What is your basic setup ? (how are these boxes connected with the firewall box ?)
    3. How do you provide your clients to surf internet ? (through proxy or packet forwarding)

Posting Permissions

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