dgingeri
2[H]4U
- Joined
- Dec 5, 2004
- Messages
- 2,830
I have two Ubuntu haproxy servers that I need to configure remotely to block all traffic except http/https from anyone and SSH traffic from our HQ.
I'm working on formulating the commands, but I need one vital piece of information before I run them: If I run a script to configure iptables that disconnects my SSH session with its first step, will the rest of the script still execute?
The reason I ask is that I need to have the first step set the firewall to reject everything by default, which means my SSH session will be disconnected. The rest of the steps would then allow the SSH session back in and allow for web traffic. At least, in theory. (With our production stack, this was all done through Salt, by someone else who is now on vacation, but I am unable to get Salt to work with the QA stack.) So, would this work?
I'm working on formulating the commands, but I need one vital piece of information before I run them: If I run a script to configure iptables that disconnects my SSH session with its first step, will the rest of the script still execute?
The reason I ask is that I need to have the first step set the firewall to reject everything by default, which means my SSH session will be disconnected. The rest of the steps would then allow the SSH session back in and allow for web traffic. At least, in theory. (With our production stack, this was all done through Salt, by someone else who is now on vacation, but I am unable to get Salt to work with the QA stack.) So, would this work?