+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats ezBlock

Members
Total Members: 4
Latest: guser
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 318
Total Topics: 255
Most Online Today: 1
Most Online Ever: 58
(June 13, 2021, 10:00:25 pm)
Users Online
Members: 0
Guests: 1
Total: 1

Author Topic: Making Subnets Communicate  (Read 25 times)

des

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Making Subnets Communicate
« on: February 08, 2019, 09:12:02 pm »

This thread: https://www.linuxquestions.org/questions/linux-networking-3/running-second-router-in-router-mode-dd-wrt-4175627289/page4.html, has a solution to making things work within the NAT environment. Maybe that will do for you? I'll just repeat it here.

 To make it work with NAT, you first set both to gateway mode, and do as before. Then, in the first router's routing table, add a static route:



Code: [Select]
Network: [your second router's subnet]
Netmask: [your second router's netmask]
Gateway: [your second router's WAN address]
Then, in the second router, you save a firewall script as follows:



Code: [Select]
iptables -I FORWARD -j ACCEPT
That's what you do. Then, it works with NAT. Why they recommend having the second router on router mode, instead of this, is beyond me... I couldn't make it work as they said it should either, but this is what I chose to do. 

Share on Facebook Share on Twitter



des

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: Making Subnets Communicate
« Reply #2 on: May 09, 2021, 04:40:12 pm »
To make them communicate from an ip range only, do the same in the first router and in the second:

Code: [Select]
iptables -I FORWARD -s [IP SUBNET]/[NETMASK NUMBER] -j ACCEPT

 

+-Recent Topics

Making Subnets Communicate by des
May 09, 2021, 04:40:12 pm

Diamond DS3900v2 Drivers by des
August 10, 2020, 01:47:57 am

10 Free Cross Platform Tools and 10 Debugging Strategies for Bison and Flex Actions by des
August 05, 2020, 01:52:14 am

PNF: Even Though I Passed true to Function, Always Puts false by des
August 03, 2020, 02:56:09 am

Gonna give Linux another try by des
August 03, 2020, 02:04:12 am

Linux Newbies - How To Choose A Distro by des
August 03, 2020, 01:58:28 am

PNF: Even Though I Passed true to Function, Always Puts false by des
August 03, 2020, 01:52:51 am

PNF: Is it Appropriate? by des
August 02, 2020, 03:27:30 am

GITHUB Add Files to Create a New Version Without Deleting Other Files by des
July 31, 2020, 06:54:16 pm

What to do when you throw up on bathroom floor by des
July 14, 2020, 09:00:51 am