-1

I have three computers, my laptop, a Cloud server and a Private server, and my aim is to be able to connect my laptop to the private server for ssh and http.

All computers is running WireGuard VPN, and the Cloud server is configured to enable port forwarding with the following command:

iptables -A FORWARD -i myvpn -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Checking the iptables rules with iptables -L -v -n:

$sudo iptables -L -v -n
Chain INPUT (policy ACCEPT 4453 packets, 920K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  myvpn *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 5041 packets, 1351K bytes)
 pkts bytes target     prot opt in     out     source               destination

The /etc/sysctl.conf file is updated with net.ipv4.ip_forward = 1

Facts

  • I can ping the Private server from my laptop, but I cannot open a shell or browse
  • I can open a shell and browse the Private server from the Cloud server

I would greatly appriciate if anyone could give me a hint of what I've missed

wmmhihaa
  • 744
  • 8
  • 21

1 Answers1

0

The problem was that I'd set the AllowedIps to .../32

wmmhihaa
  • 744
  • 8
  • 21