V
V
Vadim Rybalko2015-12-01 21:24:21
proxy
Vadim Rybalko, 2015-12-01 21:24:21

How to make a tinyproxy proxy on a router?

The dlink 615 router was flashed with openwrt 15.05.
Internet via pppoe. Installed tinyproxy 1.8.3-2. Works with varying degrees of success, sometimes good, sometimes unavailable.
The purpose of the proxy server on the router.
Proxy, firewall and network configs:
/etc/config/tinyproxy

config tinyproxy
      option User 'root'
      option Group 'root'
      option Port '8080'
      option Timeout '600'
      option DefaultErrorFile '/usr/share/tinyproxy/def
      option StatFile '/usr/share/tinyproxy/stats.html'
      option LogFile '/var/log/tinyproxy.log'
      option LogLevel 'Info'
      option MaxClients '10'
      option MinSpareServers '5'
      option MaxSpareServers '20'
      option StartServers '10'
      option MaxRequestsPerChild '0'
      option ViaProxyName 'tinyproxy'
      option enabled '1'
      ConnectPort '443'
      ConnectPort '563'
      list Allow '192.168.0.0/16'
      list Allow '<b>мой_ip</b>'
      list Allow '0.0.0.0/0'

/etc/config/firewall
config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'lan'
        list network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'wan'
        list network 'wan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config include
        option path '/etc/firewall.user'

config rule
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config rule
        option target 'ACCEPT'
        option src 'wan'
        option family 'ipv4'
        option dest '*'
        option name '8080'
        option dest_port '8080'

config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp udp'
        option src_dport '8080'
        option dest_ip '192.168.1.1'
        option dest_port '8080'
        option name 'Forward8080'

/etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd23:426b:5439::/48'

config interface 'lan'
        option ifname 'eth0'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth1'
        option _orig_ifname 'eth1'
        option _orig_bridge 'false'
        option proto 'dhcp'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 4'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor Ganeles, 2015-12-10
@Ghool

What does unavailable mean?
At these moments, does the client get the proxy stub or just say the page is not available?
Try to telnet to the port - does it answer or not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question