WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Iptables Rule  (Read 3505 times)

Offline rout3rx

  • Newbie
  • *
  • Posts: 1
Iptables Rule
« on: July 08, 2009, 03:40:50 AM »
hi all

is anybody know how we can restrict internet shared in a LAN network just for 2 ip? [using iptables]
these 2 ip has the same range as other node in LAN.

thanks

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Iptables Rule
« Reply #1 on: July 09, 2009, 10:08:26 AM »
If I understand your question, correctly, you have a network of systems and you wish to restrict Internet access to only two machines. The answer depends on your network setup, in particular:

1) Do you have a DHCP server which assigns addresses to all systems? If so,
2) Are the IP addresses for the two systems randomly chosen or reserved?
3) Do any or all systems reference the Internet gateway as their default router?

Iptables references machines using IP addresses. If those machines are assigned an address via DHCP (and IP addresses are not reserved for them) their IP address can change. It is easier to configure iptables if the IP addresses do not change, either via a static configuration or by reserving the address in the DHCP server.

At a minimum, you will need to configure the Internet gateway for NAT. This web page has a lot of extra info, but it is very good: http://iptables-tutorial.frozentux.net/iptables-tutorial.html

Post additional info regarding the above questions if you need more help.

Daniel

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: Iptables Rule
« Reply #2 on: June 28, 2012, 08:57:32 AM »
The above iptables tutorial link has been changed to:
http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html