Created
          August 12, 2013 07:34 
        
      - 
      
- 
        Save tairov/6208847 to your computer and use it in GitHub Desktop. 
    nginx as transparent proxy
  
        
  
    
      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
    
  
  
    
  | (none):~# cat /etc/nginx/sites-enabled/proxy | |
| server { | |
| resolver 8.8.8.8; | |
| access_log off; | |
| listen [::]:8080; | |
| location / { | |
| proxy_pass $scheme://$host$request_uri; | |
| proxy_set_header Host $http_host; | |
| proxy_buffers 256 4k; | |
| proxy_max_temp_file_size 0k; | |
| } | |
| } | |
| iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp --dport 80 -j DNAT --to 192.168.0.253:8080 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment