Proxy Server
Source: Notion | Last edited: 2024-12-11 | ID: 1592d2dc-3ef...
- Create an ec2, assign elastic ip to that instance.
- ssh to the instance, install Squid proxy, following the instruction: https://ubuntu.com/server/docs/how-to-install-a-squid-server
sudo apt updatesudo apt install squid -y
# make a copy of the original and protect it from writingsudo cp /etc/squid/squid.conf /etc/squid/squid.conf.originalsudo chmod a-w /etc/squid/squid.conf.original
# Configure Squid, make the squid.conf as follows:ubuntu@ip-172-31-20-191:~$ cat /etc/squid/squid.conf# Allow traffic only from the trading serveracl trading_server src 172.31.21.165http_access allow trading_server
# Deny all other traffichttp_access deny all
# Set up the proxy to listen on default port 3128http_port 3128
# Restart Squid servicesudo systemctl restart squid
# Check statussudo systemctl status squidAfter running these commands, your Squid proxy server will be:
- Installed and configured with basic security settings
- Running on port 3128
- Set to start automatically on system boot
- Allowing access from trading server