# Adapted from http://tldp.org/HOWTO/TransparentProxy-6.html (6.2 Second method) # Note that the choice of firewall mark (3) and routing table (2) was fairly arbitrary. # If you are already using policy routing or firewall marking for some other purpose, # make sure you choose unique numbers here. Otherwise, don't worry about it. # On the router, run PROXY_IP=192.168.1.100 TARGET_IP=192.168.1.110 iptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s ! $TARGET_IP # Alternative to MITM the whole network: # iptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s $PROXY_IP iptables -t mangle -A PREROUTING -j MARK --set-mark 3 -p tcp -m multiport --dports 80,443 ip rule add fwmark 3 table 2 ip route add default via $PROXY_IP dev br0 table 2 # On the proxy machine, run iptables -A PREROUTING -t nat -i eth0 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-port 8080 ain'>index : openwrt/em-br6478acv2/master-187ad058
openwrt master 187ad058James
aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-3.14/616-MIPS-ath79-ubnt-xw.patch
blob: 5e3d4d4000fbae4895305b332e4c3646671155b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95