chucklessducks / VPS-Wireguard-Nginx-Mailcow

My journey to make my own email server.
55 stars 7 forks source link

Typo in iptables rules for Nginx #6

Open ShubhankarBalel opened 1 month ago

ShubhankarBalel commented 1 month ago

In the iptables config for nginx these two lines are duplicated: sudo iptables -A FORWARD -i wg0 -o enp1s0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -A FORWARD -i wg0 -o enp1s0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

It should actually be sudo iptables -A FORWARD -i wg0 -o enp1s0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -A FORWARD -i enp1s0 -o wg0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

with the two network interfaces switched

I'm new to all this stuff so correct me if I'm wrong but I spent hours troubleshooting this issue before realizing this. I believe this is correct.