Hi Guys
I was wondering if someone could assist me on what im trying to do,
Currently everything is working fine with wireguard the only issue is that we have users in the same subnet as your remote network
Currently i have working wireguard docker
the thing is that i have some users at their homes which have the same network as our office network which therefor overlaps
I was reading a bit and i think its called NAT mapping
and my wireguard server network [10.252.1.0/24]
My servers samba server is [192.168.2.250
i was wondering if i can NAT map lets say using [10.10.10.250]
so when my users use the IP [10.10.10.250] it would map to [192.168.2.250]
This is currently my post up script
iptables -t nat -A POSTROUTING -s 10.252.1.0/24 -o eth0 -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT;
i have tried this but cannot seem to get it working
iptables -t nat -A POSTROUTING -s 10.252.1.0/24 -o eth0 -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT;iptables -t nat -A PREROUTING -d 192.168.2.250/32 -j NETMAP --to 10.10.10.250/32; iptables -t nat -A POSTROUTING -s 10.10.10.250/32 -j NETMAP --to 192.168.2.250/32;
but cant seem to get it working
any ideas?