Quote:
Originally Posted by maliha
Now what i want is to access this internal windows machine at 10.1.0.10 from any of my external machines 192.168.1.x . For this purpose i need to do static NATing at LxNAT machine via iptables.
|
You can actually do it in many ways.
If 192.168.1.190 can act as the default gateway for its class (like the way 10.1.0.1 is) then you dont even need NATing. Switching ON the ip_forwarding at kernel will do the needful.
Or otherwise you can make 192.168.1.x class default router to re-route packets destined for 10.1.0.10 to 192.168.1.190. (if you have access & rights to configure it)
Quote:
Originally Posted by maliha
More clearly what i want is to assign an ip address from 192.168.1.x pool say 192.168.1.211 to my internal windows machine (10.1.0.10). So that when i ping from let say 192.168.1.20 to 192.168.1.211 the request is routed from LxNAT to internal windows machine 10.1.0.10.
and vice versa.
|
If you precisely want to achieve this, then you got to give your linux box a virtual ip of .211 & then forward all or desired packets over to 10.1.0.10 with
Code:
iptables -t nat -A PREROUTING -d 192.168.1.211 -j DNAT --to 10.1.0.10
You can still achieve the same without placing that virtual ip as well.
p.s : Also make sure that switch on the ip-forwarding at kernel level prior to this.