Find the answer to your Linux question:
Results 1 to 1 of 1
Hello First i want say sorry for bad english Here mine situation I work in huge gonoverment netowk. Mine network uses proxy to acces internet. Shame that proxy not transparent... ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4

    If itsis psoosible? Forward to squid proxy


    Hello
    First i want say sorry for bad english
    Here mine situation

    I work in huge gonoverment netowk. Mine network uses proxy to acces internet. Shame that proxy not transparent... so i must every time tipe setting in every PC. Thats anoying. SO i want to change situation.

    I made a bit stupid gateway PC (debian). With single network adapter. Mess a bit with IP tables. And simple gateway working.
    network Cnfig:
    Code:
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    allow-hotplug eth0
    #iface eth0 inet dhcp
    iface eth0 inet static
    	address 10.0.8.226
    	netmask 255.255.255.0
    	gateway 10.0.8.1
    iptables Config:
    Code:
    ###Flush iptables configurations
    iptables -F
    iptables -X
    iptables -t nat -F
    iptables -t nat -X
    iptables -t mangle -F
    iptables -t mangle -X
    iptables -P INPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -P OUTPUT ACCEPT
    
    ###Enable IP forwarding
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    ###Enable ip masquerading
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    And all seemes working.. i can browse sies (with proxie esttings).

    So now i want with that Gateway make proxie transparent. So i'm tryeing to forward 80 port to proxie.
    Config:
    Code:
    ###Flush iptables configurations
    iptables -F
    iptables -X
    iptables -t nat -F
    iptables -t nat -X
    iptables -t mangle -F
    iptables -t mangle -X
    iptables -P INPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -P OUTPUT ACCEPT
    
    ###Enable IP forwarding
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    ###Enable ip masquerading
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    
    ###bandau forwardint 80 porta
    iptables -A FORWARD -j ACCEPT
    iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 212.59.6.119:80
    Well it seems forwarding working... but i try to get page (for example w w w . linuxforums . org)... i get from proxy error
    Code:
    ERROR
    The requested URL could not be retrieved
    --------------------------------------------------------------------------------
    While trying to retrieve the U R L: / 
    
    The following error was encountered: 
    
    •Invalid URL 
    Some aspect of the requested URL is incorrect. Possible problems: 
    
    •Missing or incorrect access protocol (should be `h t t p : / /'' or similar) 
    •Missing hostname 
    •Illegal double-escape in the U R L-Path 
    •Illegal character in hostname; underscores are not allowed 
    --------------------------------------------------------------------------------
    Generated Thu, 11 Nov 2010 11:02:48 GMT by ... (squid/3.0.STABLE25)
    But if i put proxie setting in browser (212.59.6.119:80) all again works fine.

    So i want to advice what i'm doing wrong..

    P.s. Auto proxie seetings not possible. And i hawe a lot of notebooks.. so they every time need to change setting.. and thats bad

    PLZ help
    Last edited by niekshas; 11-11-2010 at 10:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •