LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-26-2010, 11:09 AM   #1
sys7em
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Slackware
Posts: 158

Rep: Reputation: 30
linksys wrt54gl, tomato firmware, iptables problem denying access from ip2ip


Hello all,

I have rather silly problem here. I have successfully flashed my brand new linksys wrt54gl router with the latest tomato firmware.

Now I need to make ips 192.168.1.2-192.168.1.99 to NOT have access to ips 192.168.1.100-192.168.1.199 on my local network. I know it's something with the FORWARD chain in the iptables rules, but I do not have the knowledge of iptables to make it yet.

Can someone help me out?

Something like that maybe?:

iptables -A FORWARD -s 192.168.1.2-192.168.1.99 -d 192.168.1.100-192.168.1.199 -j DROP

Thanks in advance.
 
Old 04-27-2010, 03:55 AM   #2
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
You need the 'iprange' module for iptables.

Code:
iptables -A FORWARD -m iprange  --src-range 192.168.1.2-192.168.1.99  --dst-range 192.168.1.100-192.168.1.199 -j DROP
iptables -A FORWARD -m iprange  --src-range 192.168.1.100-192.168.1.199 --dst-range 192.168.1.2-192.168.1.99 -j DROP
 
Old 04-27-2010, 03:59 AM   #3
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
Acctualy, I'm not sure if that will work on a WRT54G. I think that the 4 ethernet ports are actually on an internal switch. If that is the case then you will not be able to filter port to port packets as the traffic will not go through netfilter/iptables.
 
Old 04-27-2010, 02:23 PM   #4
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
The switch may get confused if you try software bridge the VLAN, it depends on if it has separate forwarding tables for each VLAN. That will also be slow.

WRT54Gs typically run Linux 2.4 due to the historic lack of an open source wifi driver, bridge netfilter support was introduced later. I believe the wifi driver bridges packet internally, so that would be another problem.

You should however be able to use it as a routing firewall.

Edit:Software bridging does in fact work on my WRT54GS v4, and wire to wire bridging firewall works, wireless to wireless fire-walling doesn't work in dd-wrt.

Last edited by TimothyEBaldwin; 04-27-2010 at 06:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WRT54GL with Tomato (or similar) vs N router with stock firmware? sidewalking General 1 11-16-2009 03:31 PM
LXer: Tasty Tomato firmware for routers LXer Syndicated Linux News 1 01-29-2009 08:11 AM
LXer: Tomato Firmware Turns Your Cheap Wireless Router Into a Powerhouse LXer Syndicated Linux News 0 10-06-2008 12:20 PM
LXer: Introduction to Tomato Firmware LXer Syndicated Linux News 0 10-03-2008 12:30 AM
QoS question with Linksys WRT54GL and Tomato kotty Linux - Networking 1 01-02-2008 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration