Hello, how are you?
I am having an inconvenient with a VPC Gateway, following the guide https://docs.digitalocean.com/products/networking/vpc/resources/droplet-as-gateway/ , I implemented all the steps, but by integrating a server within the vpc network and redirecting traffic through the gateway server, I have problems with my application that is running on apache, because only when I access the link works quickly and after that all HTTP requests are never called .
Design Implemented: https://docs.digitalocean.com/products/networking/vpc/resources/droplet-as-gateway/
I leave information of MTR Report from Server inside the VPC:
mtr --report google.com
Start: 2022-02-21T22:51:48+0000
HOST: vps-host Loss% Snt Last Avg Best Wrst StDev 1.|-- _gateway 0.0% 10 0.9 1.0 0.8 1.5 0.2
2.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
3.|-- www.xxx.yyy.zzz 0.0% 10 16.7 6.2 1.1 16.7 5.2
4.|-- www.xxx.yyy.zzz 0.0% 10 10.3 4.4 1.9 10.3 3.7
5.|-- www.xxx.yyy.zzz 0.0% 10 1.7 3.8 1.3 23.0 6.8
6.|-- www.xxx.yyy.zzz 0.0% 10 2.1 2.3 2.0 3.6 0.5
7.|-- www.xxx.yyy.zzz 0.0% 10 2.0 18.8 1.9 166.0 51.7
8.|-- www.xxx.yyy.zzz 0.0% 10 2.8 2.9 2.7 3.2 0.2
9.|-- www.xxx.yyy.zzz 0.0% 10 3.0 2.9 2.8 3.0 0.1
10.|-- lga25s81-in-f14.1e100.net 0.0% 10 2.8 3.4 2.8 8.1 1.7
I leave information of MTR Report from gateway:
mtr --report google.com
Start: 2022-02-21T22:54:56+0000
HOST: vps-gateway Loss% Snt Last Avg Best Wrst StDev 1.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
2.|-- www.xxx.yyy.zzz 0.0% 10 0.5 0.7 0.5 1.2 0.2
3.|-- www.xxx.yyy.zzz 0.0% 10 0.8 3.8 0.8 27.6 8.4
4.|-- www.xxx.yyy.zzz 0.0% 10 0.7 0.8 0.6 1.2 0.1
5.|-- www.xxx.yyy.zzz 0.0% 10 0.9 1.0 0.9 1.4 0.1
6.|-- www.xxx.yyy.zzz 0.0% 10 1.3 1.4 1.2 1.8 0.2
7.|-- www.xxx.yyy.zzz 0.0% 10 1.9 2.0 1.9 2.2 0.1
8.|-- www.xxx.yyy.zzz 0.0% 10 1.8 1.9 1.8 2.2 0.1
9.|-- lga25s79-in-f14.1e100.net 0.0% 10 1.9 1.9 1.8 2.3 0.1
I look forward to hearing from you, thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Based on the MTR reports you’ve provided:
MTR Report Observations:
Possible Issues:
iptables rules for NAT (Network Address Translation) and forwarding.Troubleshooting Steps:
sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ip route show. Ensure the gateway is correctly set to the private IP address of your gateway droplet.ufw or iptables rules on both the VPC server and the gateway that might be causing the problem.netstat -s.
- Use tcpdump to inspect packets and see if anything stands out as problematic, especially when you try to access your application.
Remember:
iptables might be lost upon reboot unless saved. You can use iptables-persistent to ensure they persist.If after these steps you’re still encountering issues, it would be beneficial to get more specific information about your Apache configuration, the nature of the application, and more specifics about the networking setup.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.