Changeset 5694


Ignore:
Timestamp:
Aug 10, 2017, 12:45:15 PM (22 months ago)
Author:
Juanma
Message:

Added iptables-save mechanism

Location:
zero-lliurex-transparent-proxy/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-transparent-proxy/trunk/fuentes/debian/changelog

    r5587 r5694  
     1zero-lliurex-transparent-proxy (0.5-lliurex4) xenial; urgency=medium
     2
     3  * Added iptables-save mechanism
     4
     5 -- Juanma Navarro Mañez <juanma1980@gmail.com>  Thu, 10 Aug 2017 12:44:08 +0200
     6
    17zero-lliurex-transparent-proxy (0.5-lliurex3) xenial; urgency=medium
    28
  • zero-lliurex-transparent-proxy/trunk/fuentes/install-files/usr/sbin/transparent-proxy-manager.py

    r5582 r5694  
    114114                self._exe_cmd('iptables -t nat -A PREROUTING -s '+net_ip+'/16 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports '+str(self.sslPort))
    115115                self._exe_cmd('iptables -t nat -A PREROUTING -s '+net_ip+'/16 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128')
     116                #Save the rules files
     117                iptablesRulesFile='/usr/share/iptables/transparent.rules'
     118                os.makedirs(os.path.dirname(iptablesRulesFile))
     119                self._exe_cmd('iptables-save > '.iptablesRulesFile)
     120
    116121        #def _add_iptables_redirection
    117122
     
    123128                try:
    124129                        self._exe_cmd('iptables -t nat -F')
     130                        self._exe_cmd('iptables-save > '.iptablesRulesFile)
    125131                except Exception as e:
    126132                        print(str(e))
Note: See TracChangeset for help on using the changeset viewer.