This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Manually secure port 6379 | |
| sudo iptables -A INPUT -p tcp --dport 6379 -s xxx.xxx.xxx.xxx -j ACCEPT | |
| sudo iptables -A INPUT -p tcp --dport 6379 -j DROP | |
| sudo iptables -L | |
| # Save current firewall config | |
| sudo iptables-save > /etc/iptables.conf | |
| # Load iptables.conf on startup | |
| sudo nano /etc/rc.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Convert PhantomJs cookies to NetScape HTTP cookie file format | |
| // NOTE: It dose not create NetScape HTTP cookie file, this function return only cookie file contents | |
| // NOTE: PhantomJs do not store "host only" cookie param, all cookies will have "host only" param set to false (line 15) | |
| // I use this function to export PhantomJs cookies to CURL cookiejar file | |
| // This is modified version of EditThisCookie cookie_helpers.js cookiesToString function | |
| // USAGE: phantomJsCookiesToNetScapeString(phantom.cookies); | |
| var phantomJsCookiesToNetScapeString = function(cookies) { | |
| var string = ""; | |
| string += "# Netscape HTTP Cookie File\n"; |