What's new

Problem getting iptables to work

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Paperize

New Around Here
Hello,

I am trying to block a single client machine from accessing a NAS server that's in the same network subnet of 10.0.1.0/24.

The client has an IP address of 10.0.1.87/24.
The NAS has an IP address of 10.0.1.200/24.
The Asus router in use for this network is at 10.0.1.1/24.

I want to use iptables to block client>NAS but allow NAS<Client connections.

I haven't figured out the second rule, but to block client>NAS, I've tried:

iptables -I FORWARD -s 10.0.1.87 -d 10.0.1.200 -j logdrop

After running the above command, the client is still able to speak with the NAS and visit its file shares and Web management page.

Is there something wrong that I am doing with this rule?
 
You can't. LAN traffic goes through a network switch, it never hits iptables. Any block would have to be done by the NAS itself.
 
You can't. LAN traffic goes through a network switch, it never hits iptables. Any block would have to be done by the NAS itself.
Thanks for this information. I totally forgot that switches don't work with IP addresses. How do I go about controlling access to the LAN with the Asus router? Or, would I have to look for different equipment?

The only thing I can think of is using two asus routers... and then the iptables rules would work?
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top