- Más nuevo
- Más votos
- Más comentarios
I had a problem with this too but found that the AWS Linux 2 AMI has rules that come preconfigured in /etc/sysconfig/iptables that are set to reject any incoming traffic except SSH (port 22). It makes sense. What I did, and I don't know if this ultimately what you'd want to do long term, is flush the rules with iptables -F, add the rules I wanted for port forwarding and then saving those over /etc/sysconfig/iptables.
ex:
sudo iptables -F
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -t nat -A PREROUTING -p tcp -d 10.0.20.172 --dport 1433 -j DNAT --to-destination 10.0.1.160:1433
sudo iptables-save|sudo tee /etc/sysconfig/iptables
This at least got me to where things were working. Hope this helps.
Edited by: ericdred-pixsys on Feb 26, 2021 4:30 PM
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año