Sharing internet with another aparment

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
kilko
DD-WRT Novice


Joined: 24 Jan 2011
Posts: 3

PostPosted: Mon Jan 24, 2011 18:58    Post subject: Sharing internet with another aparment Reply with quote
Hi,

I have a cabel modem, 17/4 mbps.
I planing on sharing my internet connection with my apartment downstairs (which is rented by 3 persons).
My IP range: 192.168.0.1

My setup is easy:
Cable modem - linkys wrt54g - Netgear 16p GB switch

From the Netgear - I have cable going downstairs, and i'm planning (and this is why i'm posting here..) on placing a new linkys wrt54g, using their own router, so they get their own IP range etc..
(i.e. 10.0.0.1)
This router will not be accessible for the people renting. (only me, in case they wanted to reset router password etc..)

And of course I do not want the two networks to see each other, OR be able to access each other. Even if they just put static IPs on their computers.

Is this possible ?
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Mon Jan 24, 2011 20:31    Post subject: Reply with quote
That depends whether you're connecting to the router or to the switch. If you're connecting to the router then see this guide:

http://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_%28Separate_Networks_With_Internet%29#GUI_Tutorial

If you're connecting to the switch then the switch will also need to be capable of VLAN's and you'll have to configure it to do VLAN trunking with the router.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
kilko
DD-WRT Novice


Joined: 24 Jan 2011
Posts: 3

PostPosted: Mon Jan 24, 2011 21:18    Post subject: Reply with quote
Thank you for fast reply Smile
I've opened page and studying it now..
I also ordered another WRT54GL - which I may do testing on, while the other one is "live" Smile
kilko
DD-WRT Novice


Joined: 24 Jan 2011
Posts: 3

PostPosted: Tue Jan 25, 2011 20:38    Post subject: Reply with quote
Is is also just possible to add a "iptables" command so that the router blocks/drops all connections made to 192.168.0.2 - 192.168.0.255 ?

Aha..
I just found the answer to my own question in this thread: https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=82796&highlight=blocking

In short:
All you need is this in your firewall script.
(Thanx to phuzi0n)

iptables -I FORWARD -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -j DROP


And if you want to allow one server, do this instead;
Adding by this order should work:
iptables -I FORWARD -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -j DROP
iptables -I FORWARD -d 172.16.1.50 -j ACCEPT
(Thanx disco)

Now all computers connected to the 10.0.0.x network (second router) either wireless or through LAN1-4 will not be able to connect to my servers running on 192.168.0.x (first router)

...even found some nice stuff here for blocking specific ports; http://www.dd-wrt.com/phpBB2/viewtopic.php?t=22412

I'm happy!! Wink
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum