1 Replies - 433 Views - Last Post: 16 December 2016 - 10:44 AM

#1 mercy_angel  Icon User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 321
  • Joined: 28-February 13

iptables for vpn clients

Posted 13 December 2016 - 03:52 PM

Hello guys, i am having some issue with my vpn clients...
I wanted to my vpn clients to see all subnets. Whatever i tried nothing helped.THis is part of my iptables

-A POSTROUTING -o eth0 -s 192.168.230.0/20 -d 192.168.20.0/24 -j MASQUERADE
-A POSTROUTING -o eth0 -s 192.168.250.0/20 -d 192.168.21.0/24 -j MASQUERADE
-A POSTROUTING -o tun0 -s 192.168.10.0/24 -d 192.168.240.0/20 -j MASQUERADE
-A POSTROUTING --source 192.168.10/24 --out-interface tun0 -j MASQUERADE
-A POSTROUTING --source 192.168.11.0/24 --out-interface tun0 -j MASQUERADE
-A POSTROUTING --source 192.168.50.0/24 --out-interface tun0 -j MASQUERADE



So now is clear example. I am in VPN and ip which i get is from .250 network and I cant reach to .50 network. So this is a just a few my subnets, i have it more, but thats not the point. Can I just put something to get through all my tun0 interface on vpn server?

So, vpn clients must see each other through vpn server. Its to hard to write all subnets. I tried to put 192.168.0.0/16 but nothing helped there...

This post has been edited by mercy_angel: 13 December 2016 - 04:13 PM


Is This A Good Question/Topic? 0
  • +

Replies To: iptables for vpn clients

#2 bigmatt267  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 79
  • Joined: 02-December 09

Re: iptables for vpn clients

Posted 16 December 2016 - 10:44 AM

I did the same for a set of IPs in a linux server.
Skip down to "Routing Traffic VIA Your VPN Connection"

https://support.hide...-router-for-VPN
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1