1

I am relatively new to this community and am hopeful that somebody can help me with my problem.

My network setup is the following

Router, IP 192.168.1.1, two interfaces:

wlan1
Subnet: 192.168.1.0
Mask: 255.255.255.0
Gateway: 192.168.1.1
DNSmasq: DHCP Range 192.168.1.100-92.168.1.150

wlan2
Subnet: 192.168.2.0
Mask: 255.255.255.0
Gateway: 192.168.2.1
DNSmasq: DHCP Range 192.168.2.100-92.168.2.150

VPN Gateway, IP 192.168.1.2
(connected to wlan1, static ip)

I would like all clients connected to wlan2 to use the VPN Gateway with the IP 192.168.1.2 as their standard internet gateway. This IP is on a different subnet.

I have read a lot about a gateway being on a different subnet and I think it can be achieved by using static routing rules.

Unfortunately I am unable to build the needed rules. Is anybody able to help me?

Thanks!

khofm
  • 111
  • 2
  • What kind of router? Can you use a source-route on your router? That is a route that sends all traffic from 192.168.2.0/24 to 192.168.1.2? – Zoredache Mar 23 '17 at 18:32
  • It's not exactly clear to me what you're asking but this statement makes me think you'd like them to use the VPN gateway as their default gateway: `I would like all clients connected to wlan2 to use the VPN Gateway with the IP 192.168.1.2 as their standard internet gateway`. This isn't possible. the DG must be local to the client. You could route all of their internet traffic through the VPN gateway via the client's local default gateway, but not directly via the VPN gateway. – joeqwerty Mar 23 '17 at 18:45
  • @Zoredache, I do use a Netgear R7000 with DDWRT firmware. – khofm Mar 23 '17 at 19:12
  • @joeqwerty, I am actually not sure if I have to make 192.168.1.2 (VPN Router) the default GW. Maybe 192.168.2.1 (the router) can stay their default GW and I could, as I think you said, have a rule on the router to forward all traffic from 192.168.2.0 clients to the VPN router at 192.168.1.2 (and the way back)?! – khofm Mar 23 '17 at 19:14
  • @joeqwerty, thinking further about it, I think what you are recommending is exactly what I need. How would I achieve that? Thanks for your help! – khofm Mar 23 '17 at 20:17

0 Answers0