From: "atul garg" Subject: Re: Re: Re: blocking netbios traffic using iptables Date: 1 May 2003 09:49:32 -0000 Sender: linux-admin-owner@vger.kernel.org Message-ID: <20030501094932.23330.qmail@webmail36.rediffmail.com> Reply-To: "atul garg" Mime-Version: 1.0 Return-path: Content-Disposition: inline List-Id: Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-admin@vger.kernel.org logically data is going out from the eth0 interface, so i fell it should be -o eth0 only.. but i have tried the rules with -A INPUT -i eth0 and they too, don't seem to work either.. the Vms are using the network interface of the host linux box only.. so FORWARD chain is not traversed. but i have tried applying rules there too(in the FORWARD chain) for no gain. any further help is highly appreciated. atul On Thu, 01 May 2003 Stephen Satchell wrote : >At 04:37 AM 5/1/03 +0000, atul garg wrote: >>I have tried blocking 137:139 tcp/udp ports. >>but it doesn't seem to work.. >> >>im trying the rules >> >>iptables -A OUTPUT -o eth0 -p tcp --dports 137:139 -j DROP >>iptables -A OUTPUT -o eth0 -p udp --dports 137:139 -j DROP >> >>actually I am running a win2k virtual machine inside a linux >>box.. >>and all i want is that vm shouldn't be able to locate other >>windows >>machines on the network by their name. > >Consider adding these rules: > >iptables -A INPUT -i eth0 -p tcp --dports 137:139 -j DROP >iptables -A INPUT -i eth0 -p udp --dports 137:139 -j DROP > >Also, does the virtual machine use its own network access? Then >you could be looking at a forwarding situation, where the W2K emulator talks through its own set of ports, so from the viewpoint of IPTABLES you have an "outside" system forwarding through the box. If so, add these rules: > >iptables -A FORWARD -i eth0 -p tcp --dports 137:139 -j DROP >iptables -A FORWARD -i eth0 -p udp --dports 137:139 -j DROP >iptables -A FORWARD -o eth0 -p tcp --dports 137:139 -j DROP >iptables -A FORWARD -o eth0 -p udp --dports 137:139 -j DROP > >Alternatively, see what network ports are active in your box (/sbin/ifconfig) and add rules as appropriate. > >-- >X -> unknown; Spurt -> drip of water under pressure >Expert -> X-Spurt -> Unknown drip under pressure. >