IPv6 proxies are raised by tunneling ipv4-> ipv6 to squid3, hosting amazon aws free tier ubuntu 14.04 (elastic IP is allocated or otherwise static IPv4). / 48 Network is taken from tunnelbroker.net. The problem is visible in the proxy server logs, but its solution is unclear:
Cache.log file
root@ip-172-31-42-58:/home/ubuntu/squid-3.3.8# cat /usr/local/squid/var/logs/cache.log 2017/01/03 09:30:09 kid1| Starting Squid Cache version 3.3.8 for x86_64-unknown-linux-gnu... 2017/01/03 09:30:09 kid1| Process ID 1456 2017/01/03 09:30:09 kid1| Process Roles: worker 2017/01/03 09:30:09 kid1| With 60000 file descriptors available 2017/01/03 09:30:09 kid1| Initializing IP Cache... 2017/01/03 09:30:09 kid1| DNS Socket created at [::], FD 7 2017/01/03 09:30:09 kid1| DNS Socket created at 0.0.0.0, FD 8 2017/01/03 09:30:09 kid1| Adding nameserver 172.31.0.2 from /etc/resolv.conf 2017/01/03 09:30:09 kid1| Adding nameserver 8.8.8.8 from /etc/resolv.conf 2017/01/03 09:30:09 kid1| Adding nameserver 8.8.4.4 from /etc/resolv.conf 2017/01/03 09:30:09 kid1| Adding domain us-west-2.compute.internal from /etc/resolv.conf 2017/01/03 09:30:09 kid1| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log 2017/01/03 09:30:09 kid1| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log 2017/01/03 09:30:09 kid1| Store logging disabled 2017/01/03 09:30:09 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects 2017/01/03 09:30:09 kid1| Target number of buckets: 1008 2017/01/03 09:30:09 kid1| Using 8192 Store buckets 2017/01/03 09:30:09 kid1| Max Mem size: 262144 KB 2017/01/03 09:30:09 kid1| Max Swap size: 0 KB 2017/01/03 09:30:09 kid1| Using Least Load store dir selection 2017/01/03 09:30:09 kid1| Current Directory is /home/ubuntu/squid-3.3.8 2017/01/03 09:30:09 kid1| Loaded Icons. 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 11 to 35.161.222.146:30000: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 12 to 35.161.222.146:30001: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 13 to 35.161.222.146:30002: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 14 to 35.161.222.146:30003: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 15 to 35.161.222.146:30004: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 16 to 35.161.222.146:30005: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 17 to 35.161.222.146:30006: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 18 to 35.161.222.146:30007: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 19 to 35.161.222.146:30008: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| commBind: Cannot bind socket FD 20 to 35.161.222.146:30009: (99) Cannot assign requested address 2017/01/03 09:30:09 kid1| HTCP Disabled. 2017/01/03 09:30:09 kid1| Squid plugin modules loaded: 0 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30000 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30001 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30002 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30003 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30004 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30005 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30006 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30007 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30008 2017/01/03 09:30:09 kid1| Closing HTTP port 35.161.222.146:30009 2017/01/03 09:30:09 kid1| storeDirWriteCleanLogs: Starting... 2017/01/03 09:30:09 kid1| Finished. Wrote 0 entries. 2017/01/03 09:30:09 kid1| Took 0.00 seconds ( 0.00 entries/sec). FATAL: Unable to open HTTP Socket Squid Cache (Version 3.3.8): Terminated abnormally. CPU Usage: 0.017 seconds = 0.014 user + 0.003 sys Maximum Resident Size: 66128 KB Page faults with physical i/o: 0 Memory usage for squid via mallinfo(): total space in arena: 4628 KB Ordinary blocks: 4581 KB 15 blks Small blocks: 0 KB 1 blks Holding blocks: 31208 KB 6 blks Free Small blocks: 0 KB Free Ordinary blocks: 46 KB Total in use: 35789 KB 773% Total free: 46 KB 1% File / etc / network / interfaces:
auto lo iface lo inet loopback source /etc/network/interfaces.d/eth0.cfg auto he-ipv6 iface he-ipv6 inet6 v4tunnel address 2001:470:7f7d::2 netmask 48 endpoint 216.66.84.46 local 35.161.222.146 gateway 2001:470:7f7d::1 ttl 64 up /etc/network/up.sh down /etc/network/down.sh Eth0.cfg file
auto eth0 iface eth0 inet dhcp address 35.161.222.146 netmask 255.255.255.0 network 35.161.222.0 gateway 35.161.222.1 broadcast 35.161.222.255 dns-nameservers 8.8.8.8 8.8.4.4 Up.sh file
#!/bin/sh ip -6 addr add 2001:470:7f7d:7619:1e0b:23b8:bf7c:3cac dev he-ipv6 ip -6 addr add 2001:470:7f7d:e0de:d9c6:5d6c:fc97:dc87 dev he-ipv6 ip -6 addr add 2001:470:7f7d:ae4c:2e70:9716:2ac1:5e7c dev he-ipv6 ip -6 addr add 2001:470:7f7d:9082:a09e:de19:914f:ae8c dev he-ipv6 ip -6 addr add 2001:470:7f7d:156a:f904:38ce:0ffe:4b79 dev he-ipv6 ip -6 addr add 2001:470:7f7d:677f:6f8a:85e9:0e44:172e dev he-ipv6 ip -6 addr add 2001:470:7f7d:9b29:e666:1d07:b761:134e dev he-ipv6 ip -6 addr add 2001:470:7f7d:0332:d3d2:486f:0e31:fdf3 dev he-ipv6 ip -6 addr add 2001:470:7f7d:a181:6bed:373d:7be1:28af dev he-ipv6 ip -6 addr add 2001:470:7f7d:00ba:1c76:b5ca:6a3a:4793 dev he-ipv6 File down.sh
#!/bin/sh ip -6 addr del 2001:470:7f7d:7619:1e0b:23b8:bf7c:3cac dev he-ipv6 ip -6 addr del 2001:470:7f7d:e0de:d9c6:5d6c:fc97:dc87 dev he-ipv6 ip -6 addr del 2001:470:7f7d:ae4c:2e70:9716:2ac1:5e7c dev he-ipv6 ip -6 addr del 2001:470:7f7d:9082:a09e:de19:914f:ae8c dev he-ipv6 ip -6 addr del 2001:470:7f7d:156a:f904:38ce:0ffe:4b79 dev he-ipv6 ip -6 addr del 2001:470:7f7d:677f:6f8a:85e9:0e44:172e dev he-ipv6 ip -6 addr del 2001:470:7f7d:9b29:e666:1d07:b761:134e dev he-ipv6 ip -6 addr del 2001:470:7f7d:0332:d3d2:486f:0e31:fdf3 dev he-ipv6 ip -6 addr del 2001:470:7f7d:a181:6bed:373d:7be1:28af dev he-ipv6 ip -6 addr del 2001:470:7f7d:00ba:1c76:b5ca:6a3a:4793 dev he-ipv6 Squid.conf file
acl localnet src 127.0.0.1/32 acl SSL_ports port 443 acl Safe_ports port 80 acl Safe_ports port 21 acl Safe_ports port 443 acl Safe_ports port 70 acl Safe_ports port 210 acl Safe_ports port 1025-65535 acl Safe_ports port 280 acl Safe_ports port 488 acl Safe_ports port 591 acl Safe_ports port 777 acl CONNECT method CONNECT acl doallow src 8.8.8.8/32 auth_param basic children 5 auth_param basic realm =My HTTP proxy= auth_param basic credentialsttl 3600 hours http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow doallow localnet http_access allow all tcp_outgoing_address 127.0.0.1 all http_port 35.161.222.146:30000 name=p30000 http_port 35.161.222.146:30001 name=p30001 http_port 35.161.222.146:30002 name=p30002 http_port 35.161.222.146:30003 name=p30003 http_port 35.161.222.146:30004 name=p30004 http_port 35.161.222.146:30005 name=p30005 http_port 35.161.222.146:30006 name=p30006 http_port 35.161.222.146:30007 name=p30007 http_port 35.161.222.146:30008 name=p30008 http_port 35.161.222.146:30009 name=p30009 acl a30000 myportname p30000 acl a30001 myportname p30001 acl a30002 myportname p30002 acl a30003 myportname p30003 acl a30004 myportname p30004 acl a30005 myportname p30005 acl a30006 myportname p30006 acl a30007 myportname p30007 acl a30008 myportname p30008 acl a30009 myportname p30009 max_filedesc 60000 tcp_outgoing_address 2001:470:7f7d:7619:1e0b:23b8:bf7c:3cac a30000 tcp_outgoing_address 2001:470:7f7d:e0de:d9c6:5d6c:fc97:dc87 a30001 tcp_outgoing_address 2001:470:7f7d:ae4c:2e70:9716:2ac1:5e7c a30002 tcp_outgoing_address 2001:470:7f7d:9082:a09e:de19:914f:ae8c a30003 tcp_outgoing_address 2001:470:7f7d:156a:f904:38ce:0ffe:4b79 a30004 tcp_outgoing_address 2001:470:7f7d:677f:6f8a:85e9:0e44:172e a30005 tcp_outgoing_address 2001:470:7f7d:9b29:e666:1d07:b761:134e a30006 tcp_outgoing_address 2001:470:7f7d:0332:d3d2:486f:0e31:fdf3 a30007 tcp_outgoing_address 2001:470:7f7d:a181:6bed:373d:7be1:28af a30008 tcp_outgoing_address 2001:470:7f7d:00ba:1c76:b5ca:6a3a:4793 a30009 cache deny all dns_v4_first off via off forwarded_for delete Output ifconfig:
root@ip-172-31-42-58:/home/ubuntu/squid-3.3.8# ifconfig eth0 Link encap:Ethernet HWaddr 06:89:0a:73:4b:25 inet addr:172.31.42.58 Bcast:172.31.47.255 Mask:255.255.240.0 inet6 addr: fe80::489:aff:fe73:4b25/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1 RX packets:5085 errors:0 dropped:0 overruns:0 frame:0 TX packets:4472 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:386480 (386.4 KB) TX bytes:547478 (547.4 KB) he-ipv6 Link encap:IPv6-in-IPv4 inet6 addr: 2001:470:7f7d:9b29:e666:1d07:b761:134e/128 Scope:Global inet6 addr: 2001:470:7f7d:ba:1c76:b5ca:6a3a:4793/128 Scope:Global inet6 addr: fe80::23a1:de92/64 Scope:Link inet6 addr: 2001:470:7f7d:a181:6bed:373d:7be1:28af/128 Scope:Global inet6 addr: 2001:470:7f7d:332:d3d2:486f:e31:fdf3/128 Scope:Global inet6 addr: 2001:470:7f7d:677f:6f8a:85e9:e44:172e/128 Scope:Global inet6 addr: 2001:470:7f7d:e0de:d9c6:5d6c:fc97:dc87/128 Scope:Global inet6 addr: 2001:470:7f7d:9082:a09e:de19:914f:ae8c/128 Scope:Global inet6 addr: 2001:470:7f7d:ae4c:2e70:9716:2ac1:5e7c/128 Scope:Global inet6 addr: 2001:470:7f7d::2/48 Scope:Global inet6 addr: 2001:470:7f7d:7619:1e0b:23b8:bf7c:3cac/128 Scope:Global inet6 addr: 2001:470:7f7d:156a:f904:38ce:ffe:4b79/128 Scope:Global UP POINTOPOINT RUNNING NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:21 dropped:0 overruns:0 carrier:21 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2304 (2.3 KB) TX bytes:2304 (2.3 KB) The squid is 100% working, it is started using / usr / local / squid / sbin / squid. I can’t understand what the problem is, how to remove the Cannot bind socket FD error and make the proxy work. I will be grateful for the help
iface eth0 inet staticinstead ofiface eth0 inet dhcp? - Sergeyaddress 35.161.222.146netmask 255.255.255.0network 35.161.222.0gateway 35.161.222.1broadcast 35.161.222.255dns-nameservers 8.8.8.8 8.8.4.4I do not know exactly what kind of mask and came up with it - maksvolfiface eth0 inet dhcptoiface eth0 inet static- does not start at all - maksvolf