Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

block internet for one client

Status
Not open for further replies.

santoshdj123

Technical User
Jun 15, 2003
98
IN
Hi
I want to block internet service for one client having ip 192.168.1.2. how should i do that through iptables.
And also how to close ports on windows 2000 os. can i do that from my linux server. win 2k pro. is my client machine.
 
Thanks thedaver,

I forget to mention one thing that i am using NATing on my server.
i.e.
#iptables -F
#iptables -t nat -F POSTROUTING
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "1">/proc/sys/net/ipv4/ip_forward
And now as per u i added one line.
#iptables -A FORWARD -s 192.168.1.2/255.255.255.0 -d
0.0.0.0 -j DROP

but this is not working.
Waiting for your responce...

Santosh
 
I see your use of the "#" character at the beginning of the line. This renders the instruction as a comment and it is ignored by the command shell. Does this appear this way in your rules file or is it a function of your cut-and-paste?



Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
I used # pormpt in my post to denote the super user prompt.
 
#iptables -t nat -I POSTROUTING -s 192.168.1.2/255.255.255.0 -d 0/0 -j DROP


regards,

Darmawan W. Anandita CCNA
Network/System Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top