02-09-2024 11:08 AM
Hi All,
i have a network setup where i need to redirect specific IP range to another.
a brief overview of the network, i have a router that connects via VPN to the company network. Now i have a local network with address 192.168.0.x that i need to route it through VPN, however when i do so, it cause a conflict as we already have 192.168.0.x assigned to other devices on the company network. So i basically need to connect this local device to the router on port 3 for example, and inside the router i want to map this IP address to 172.172.160.x so that it doesn’t cause a conflict when it connects to wider company network over VPN
02-09-2024 03:32 PM
Hello @ahmedroshdy77 ,
what you have to configure is Network Address Translation (NAT). The local addresses 192.168.0.x will have to be translated to 172.172.160.x when they need to communicate with remote 192.168.0.x.
The NAT configuration will depend on how your VPN configuration is implemented. Can you share VPN config details?
02-10-2024 04:50 AM
Thank you @liviu.gheorghe .
unfortunately i don’t have VPN configuration on hand right now, but generally we are using OpenVPN with certificates assignment.
the basic router setup is WAN cable connected to port 4 (DHCP) and local devices 192.168.0.x/24 connected to port 3.
the router is configured to route all traffic from 192.168.0.x/24 through VPN to remote server. But before doing that, i need to internally translate 192.168.0.x to 172.172.160.x so it doesn’t cause conflict when it reaches the remote server.
NAT seems to be the best option as you mentioned, one question though, shall i configure Source NAT or Destination NAT?
02-10-2024 10:37 AM
The reason I was asking about the VPN configuration was to determine if the routers are Cisco and the VPN is configured using GRE tunnels.
This one way of solving your problem - all the traffic that needs to go to the other side, determined by routing protocols, goes through a GRE tunnel and this traffic is encrypted.
Using a GRE tunnel is also easy for the configuration of source NAT - the lan interface is "inside" and the tunnel interface is "outside".
You also need to define a pool of addresses into which you will translate the IP's from inside and also define an access-list that will match the IP's from inside.
All comes toghether with the command ip nat inside source list <access-list name or number> <ip pool name>
Hope this helps.
02-09-2024 11:38 PM
are your router support ip nat enable ?
MHM
02-10-2024 04:51 AM
Yes it supports NAT
02-10-2024 04:56 AM - edited 02-10-2024 04:57 AM
If I correctly understand your requirement' you need to NATing the IP before it forward via tunnel.
This need LO under this LO interface we config IP NAT outside
Then we config ip nat inside in interface traffic come from and PBR in such the traffic forward to LO if destination is remote-lan (via vpn).
This make traffic go to LO then NATing then forward via VPN.
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide