I have the following network setup and having issues trying to connect. I would appreciate if you could give me some ideas about it.

My devices are

-VPN server on amazon EC2 (windows server 2016)
Has IP

-Raspberry on a remote location (running raspbian) Has:

  • 2 physical connections.

    • wlan0 is where it gets internet access.
    • eth0 is connected to a PLC which has can ping OK
  • 1 virtual connection (vpn_se).
    VPN client attached to (vpn server at amazon). Can ping OK

Current IP addresses on raspberry

From my amazon server, i require to reach

i already configured a static route on amazon server

route add mask

But im unsure on what to setup on the iptables.

Can you please give me some ideas?

Here is a rough diagram of my current setup View post on imgur.com


You will need to make sure that Routing is turned on Raspberry PI.

Enable IP Forwarding;

sudo nano /etc/sysctl.conf

Add following line


Then run

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

The iptables to allow traffic would be something like

sudo iptables -A FORWARD -i vpn_se -o eth0 -j ACCEPT sudo iptables -A FORWARD -i eth0 -o vpn_se -j ACCEPT

References: https://raspberrypihq.com/how-to-turn-a-raspberry-pi-into-a-wifi-router/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.