naresh29 As title suggests, I have a working VPN setup on raspberry pi with below details: public IP: XX.XX.XX.XX eth0 : 192.168.1.5 gateway: 192.168.1.1 Tunnel network: 10.8.0.0/24 My clients are able to connect to vpn and get their external IP as my public IP configured in VPN. Now my next requirement is to pass the vpn traffic through wlan0 which is connected to a MI-FI device via a wireless adapter. This Mi-Fi device gets it network from network operator (vodafone) so its external IP keeps on changing. my wlan0 has static IP for 192.168.0.100 I want that when clients uses vpn, there outgoing IP should be external IP for mi-fi and not of my public Ip. Experts and friends, I want your suggestions and helps.
Traffic This may not work but you can change the iptables MASQUERADE rule to: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o wlan0 -j MASQUERADE
Traffic :roll: that is a bad idea .. naresh29 wroteI want that when clients uses vpn, there outgoing IP should be external IP for mi-fi and not of my public Ip.Is external IP for mi-fi a public IP address ?
naresh29 Is external IP for mi-fi a public IP address ?[/quote] Yes, external IP for MI-FI is a public IP
naresh29 Traffic wrote:roll: that is a bad idea .. Is external IP for mi-fi a public IP address ? Yes, external IP for mi-fi is a public IP.