<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello, thank you Eliezer!
<div class=""><br class="">
</div>
<div class="">We managed to fix the issue, but we created another.<br class="">
<div class=""><br class="">
</div>
<div class="">Restoring those iptables gives an error at first: Set bypasidrpool doesn’t exist.</div>
<div class="">So I ran the scripts (bypass domains and bypass-skye-cird) then restored the iptables you sent me and now I can access Skype for Business.</div>
<div class=""><br class="">
<div class="">The new issues now is that no websites load. I do have squidguard installed with some lists of blocked sites that get redirected to an “access denied” page on a web server. However, after applying those iptables, I can not open any site besides
 (youtube or a google search) but clicking a search result or going to any site will just give a <span style="color: rgb(105, 105, 105); font-family: 'Helvetica Neue', 'Lucida Grande', sans-serif; font-variant-ligatures: normal; orphans: 2; text-transform: uppercase; widows: 2; background-color: rgb(247, 247, 247);" class="">ERR_CONNECTION_TIMED_OUT </span><br class="Apple-interchange-newline" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class="Apple-interchange-newline" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><br class="">
This is a Ubuntu 16.04 server by the way. Squid is not in production, I am testing it.</span></span></div>
<div class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><br class="">
</span></span></div>
<div class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span>The
 server has a functional iRedmail installed on it too.<br class="">
<br class="">
<img height="38" width="45" apple-inline="yes" id="04FC2547-E4C9-48C3-9124-6D3E7C639FBB" apple-width="yes" apple-height="yes" src="cid:2FD1C3AB-E45C-49F0-84AB-0F8AC658BD11@routerb408e2.com" class=""></span><em style="font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 128, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><strong class="">Piensa
 en el medio ambiente antes de imprimir este email.</strong></em> </span></div>
<div class=""></div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 7, 2016, at 4:18 PM, Eliezer Croitoru <<a href="mailto:eliezer@ngtech.co.il" class="">eliezer@ngtech.co.il</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Try to load these iptables rues using "iptables-restore < file.txt"<br class="">
<a href="http://pastebin.com/mYsqu8D7" class="">http://pastebin.com/mYsqu8D7</a><br class="">
<br class="">
You are either running the script wrongly or my script is wrong.<br class="">
Is this a trial or a production system?<br class="">
It seems to me that you need to first test and resolve the iptables and<br class="">
squid setup and then add my script to it.<br class="">
What OS are you using?(sorry if I don't remember).<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Wednesday, December 7, 2016 10:11 PM<br class="">
To: Eliezer Croitoru <eliezer@ngtech.co.il><br class="">
Cc: squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
iptables is the same.. here is after I ran the script twice (with and<br class="">
without proxy) <br class="">
http://pastebin.com/YFtbG6St<br class="">
<br class="">
<br class="">
I have a script that bridges the two network cards, that uses nat, hence<br class="">
having both<br class="">
<br class="">
I can send you all the scripts I run to set up squid and the bypasses so you<br class="">
can reproduce the situation.<br class="">
<br class="">
thanks again!<br class="">
<br class="">
<br class="">
<br class="">
Piensa en el medio ambiente antes de imprimir este email. <br class="">
<br class="">
On Dec 7, 2016, at 12:12 PM, Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
wrote:<br class="">
<br class="">
Are you sure this setup works?<br class="">
You have both REDIRECT and TPROXY on the same machine so you need to bypass<br class="">
for both of these.<br class="">
Is this iptables-save snapshot after you ran the script?<br class="">
Also for this to work you will need to use the updated version of the script<br class="">
at:<br class="">
https://gist.github.com/elico/a54c2c8f8e1a2407b42210896b960f4b<br class="">
<br class="">
And run it twice... once with tproxy and the other without tproxy.<br class="">
After you run the script share the snapshot of "iptables-save" and "ipset<br class="">
list".<br class="">
If it can be reproducible here when I will be using SKYPE I would be able to<br class="">
test it but I believe it should work good enough to minimize the issue.<br class="">
The above depends only on one thing: NTOP Skype networks identification.<br class="">
Maybe I have mentioned but there is another script which I wrote that is<br class="">
more simplified at:<br class="">
https://gist.github.com/elico/e0faadf0cc63942c5aaade808a87deef<br class="">
<br class="">
But can be adapted to be used against skype known domains.<br class="">
The next level would be to use some kind of splice rules with an<br class="">
external_acl helper.<br class="">
The external_acl helper can receive information from squid about the request<br class="">
SNI and to verify if the server only serves skype domains or others.<br class="">
The above is a much more deeper level and I think that the first scripts<br class="">
should be enough to resolve most of the issues.<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Wednesday, December 7, 2016 6:09 PM<br class="">
To: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Cc: mailto:squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
iptables-save:  http://pastebin.com/9JrVANtt<br class="">
<br class="">
ipset list : http://pastebin.com/wtMtzaQe<br class="">
http://pastebin.com/wtMtzaQe<br class="">
http://pastebin.com/wtMtzaQe<br class="">
pastebin.com<br class="">
<br class="">
http://pastebin.com/9JrVANtt<br class="">
http://pastebin.com/9JrVANtt<br class="">
pastebin.com<br class="">
<br class="">
<br class="">
  Piensa en el medio ambiente antes de imprimir este email.<br class="">
________________________________________<br class="">
From: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Sent: Wednesday, December 7, 2016 10:58:18 AM<br class="">
To: Sameh Onaissi<br class="">
Cc: mailto:squid-users@lists.squid-cache.org<br class="">
Subject: RE: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S <br class="">
 <br class="">
Give us the "iptables-save" output and also "ipset list".<br class="">
(or what ever was the command of ipset to dump the content of the list).<br class="">
After this we can understand what is causing this issue.<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Wednesday, December 7, 2016 5:23 PM<br class="">
To: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Cc: mailto:squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
Still not working and I do not know what to do next. <br class="">
<br class="">
access.log shows IPs and domains that are supposed to be bypassed already.<br class="">
<br class="">
Any further instructions are hugely appreciated.<br class="">
<br class="">
<br class="">
<br class="">
Piensa en el medio ambiente antes de imprimir este email. <br class="">
<br class="">
On Dec 7, 2016, at 9:50 AM, Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
wrote:<br class="">
<br class="">
Was there any progress with the script and the issues?<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Wednesday, December 7, 2016 12:36 AM<br class="">
To: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Cc: 'Amos Jeffries' <mailto:squid3@treenet.co.nz>;<br class="">
mailto:squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
<br class="">
Hello Eliezer and thanks again.<br class="">
<br class="">
I ran the script with the tproxy argument.<br class="">
<br class="">
Tried to reconnect skype for business... <br class="">
<br class="">
After about a 3 min wait, a pop up saying "Skype for Business couldn't find<br class="">
a skype for business server"  and access log shows: <br class="">
<br class="">
1481061269.006    400 10.0.0.38 TCP_MISS/200 1068 GET<br class="">
http://lyncdiscover.solcv.com/? - ORIGINAL_DST/132.245.1.28<br class="">
application/vnd.microsoft.rtc.autodiscover+xml<br class="">
1481061269.270    667 10.0.0.38 TAG_NONE/200 0 CONNECT 132.245.1.28:443 -<br class="">
HIER_NONE/- -<br class="">
1481061269.270    665 10.0.0.38 TCP_TUNNEL/200 5568 CONNECT<br class="">
lyncdiscover.solcv.com:443 - ORIGINAL_DST/132.245.1.28 -<br class="">
1481061269.770    596 10.0.0.38 TAG_NONE/200 0 CONNECT 52.112.64.14:443 -<br class="">
HIER_NONE/- -<br class="">
1481061269.770    594 10.0.0.38 TCP_TUNNEL/200 6981 CONNECT<br class="">
webdir0a.online.lync.com:443 - ORIGINAL_DST/52.112.64.14 -<br class="">
1481061270.679    897 10.0.0.38 TAG_NONE/200 0 CONNECT 52.112.64.14:443 -<br class="">
HIER_NONE/- -<br class="">
1481061270.679    895 10.0.0.38 TCP_TUNNEL/200 7733 CONNECT<br class="">
webdir0a.online.lync.com:443 - ORIGINAL_DST/52.112.64.14 -<br class="">
1481061272.178    841 10.0.0.38 TAG_NONE/200 0 CONNECT 23.100.120.65:443 -<br class="">
HIER_NONE/- -<br class="">
1481061272.178    840 10.0.0.38 TCP_TUNNEL/200 20539 CONNECT<br class="">
login.microsoftonline.com:443 - ORIGINAL_DST/23.100.120.65 -<br class="">
1481061273.713    641 10.0.0.38 TAG_NONE/200 0 CONNECT 52.112.64.14:443 -<br class="">
HIER_NONE/- -<br class="">
1481061273.713    640 10.0.0.38 TCP_TUNNEL/200 8037 CONNECT<br class="">
webdir0a.online.lync.com:443 - ORIGINAL_DST/52.112.64.14 -<br class="">
1481061273.751   3054 10.0.0.38 TAG_NONE/200 0 CONNECT 52.112.64.14:443 -<br class="">
HIER_NONE/- -<br class="">
1481061273.751   3052 10.0.0.38 TCP_TUNNEL/200 24458 CONNECT<br class="">
webdir0a.online.lync.com:443 - ORIGINAL_DST/52.112.64.14 -<br class="">
1481061273.751   1544 10.0.0.38 TAG_NONE/200 0 CONNECT 52.112.64.14:443 -<br class="">
HIER_NONE/- -<br class="">
1481061273.751   1543 10.0.0.38 TCP_TUNNEL/200 11653 CONNECT<br class="">
webdir0a.online.lync.com:443 - ORIGINAL_DST/52.112.64.14 -<br class="">
<br class="">
<br class="">
so I added more ip ranges to the cidr-to-bypass.txt and ran the script again<br class="">
<br class="">
<br class="">
1481063243.370    371 10.0.0.38 TCP_MISS/200 1068 GET<br class="">
http://lyncdiscover.solcv.com/? - ORIGINAL_DST/134.170.113.210<br class="">
application/vnd.microsoft.rtc.autodiscover+xml<br class="">
1481063278.271  74233 10.0.0.38 TAG_NONE/200 0 CONNECT 104.208.31.113:443 -<br class="">
HIER_NONE/- -<br class="">
1481063278.271  74231 10.0.0.38 TCP_TUNNEL/200 6746 CONNECT<br class="">
pipe.skype.com:443 - ORIGINAL_DST/104.208.31.113 -<br class="">
1481063344.143  60720 10.0.0.38 TAG_NONE/200 0 CONNECT 104.208.31.113:443 -<br class="">
HIER_NONE/- -<br class="">
1481063344.143  60719 10.0.0.38 TCP_TUNNEL/200 6389 CONNECT<br class="">
pipe.skype.com:443 - ORIGINAL_DST/104.208.31.113 -<br class="">
<br class="">
a new set showed up...<br class="">
<br class="">
what more can we do?<br class="">
<br class="">
keep adding ip ranges?<br class="">
<br class="">
thanks<br class="">
<br class="">
  Piensa en el medio ambiente antes de imprimir este email.<br class="">
________________________________________<br class="">
From: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Sent: Tuesday, December 6, 2016 4:36:56 PM<br class="">
To: Sameh Onaissi<br class="">
Cc: 'Amos Jeffries'; mailto:squid-users@lists.squid-cache.org<br class="">
Subject: RE: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S <br class="">
 <br class="">
Try the next script:<br class="">
https://gist.github.com/elico/a54c2c8f8e1a2407b42210896b960f4b <br class="">
https://gist.github.com/elico/a54c2c8f8e1a2407b42210896b960f4b<br class="">
https://gist.github.com/elico/a54c2c8f8e1a2407b42210896b960f4b<br class="">
gist.github.com<br class="">
bypass squid interception for skype<br class="">
<br class="">
<br class="">
<br class="">
It has two modes: regular and tproxy.<br class="">
In your case you should run the script with:<br class="">
$ bypass-skype-cidr.sh tproxy<br class="">
<br class="">
The tproxy flag should do the trick for you.<br class="">
<br class="">
Let me know if it works for you.<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Tuesday, December 6, 2016 9:24 PM<br class="">
To: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Cc: Amos Jeffries <mailto:squid3@treenet.co.nz>;<br class="">
mailto:squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
Yes please, I would appreciate help with that script.  <br class="">
<br class="">
As I aforementioned, totally new to all this<br class="">
<br class="">
<br class="">
<br class="">
Piensa en el medio ambiente antes de imprimir este email. <br class="">
<br class="">
On Dec 6, 2016, at 1:27 PM, Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
wrote:<br class="">
<br class="">
Now you can enhance the script by adding manually the ntop skype related<br class="">
networks based on:<br class="">
https://github.com/ntop/nDPI/blob/d9a2d9a6bd4d476d666d26cb713952760a975d92/s<br class="">
rc/lib/ndpi_content_match.c.inc#L286<br class="">
<br class="">
/*<br class="">
Skype (Microsoft CDN)<br class="">
157.56.135.64/26, 157.56.185.0/26, 157.56.52.0/26,<br class="">
157.56.53.128/25, 157.56.198.0/26<br class="">
157.60.0.0/16, 157.54.0.0/15 <br class="">
13.107.3.128/32<br class="">
13.107.3.129/32<br class="">
111.221.64.0 - 111.221.127.255<br class="">
91.190.216.0/21 (AS198015 Skype Communications Sarl)<br class="">
91.190.218.0/24<br class="">
40.126.129.109/32<br class="">
65.55.223.0/26<br class="">
*/<br class="">
<br class="">
If you need help scripting this let me know.<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Tuesday, December 6, 2016 7:29 PM<br class="">
To: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Cc: Amos Jeffries <mailto:squid3@treenet.co.nz>;<br class="">
mailto:squid-users@lists.squid-cache.org<br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
Hello, <br class="">
<br class="">
OK, I added the ssl_bump slice on the skype domains text file<br class="">
I installed ipset and ran the script.<br class="">
<br class="">
Now access.log has much less skype related logs:<br class="">
<br class="">
What is left is:<br class="">
1481044996.398   3412 10.0.0.11 TAG_NONE/200 0 CONNECT 132.245.1.32:443 -<br class="">
ORIGINAL_DST/132.245.1.32 -<br class="">
1481044996.423      0 10.0.0.11 TAG_NONE/400 3998 REGISTER<br class="">
sip:solcv.comSIP/2.0 - HIER_NONE/- text/html<br class="">
1481045000.296    372 10.0.0.11 TAG_NONE/200 0 CONNECT 134.170.113.207:443 -<br class="">
ORIGINAL_DST/134.170.113.207 -<br class="">
1481045000.325      0 10.0.0.11 TAG_NONE/400 3998 REGISTER<br class="">
sip:solcv.comSIP/2.0 - HIER_NONE/- text/html<br class="">
1481045008.685   4259 10.0.0.11 TAG_NONE/200 0 CONNECT 134.170.113.207:443 -<br class="">
ORIGINAL_DST/134.170.113.207 -<br class="">
1481045008.726      0 10.0.0.11 TAG_NONE/400 3998 REGISTER<br class="">
sip:solcv.comSIP/2.0 - HIER_NONE/- text/html<br class="">
<br class="">
<br class="">
although http://solve.com is in the text file.<br class="">
<br class="">
I ran whois on the first IP and got:<br class="">
<br class="">
NetRange:       132.245.0.0 - 132.245.255.255<br class="">
CIDR:           132.245.0.0/16<br class="">
NetName:        MICROSOFT<br class="">
<br class="">
<br class="">
Same with the 134.170. address. Can we slice that range?<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
Sameh Onaissi<br class="">
Ingeniero de Soporte<br class="">
Sol Cable Visión<br class="">
Cel: 316-3023424<br class="">
Email: mailto:sameh.onaissi@solcv.com<br class="">
<br class="">
<br class="">
<br class="">
Piensa en el medio ambiente antes de imprimir este email. <br class="">
<br class="">
On Dec 6, 2016, at 12:11 PM, Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
wrote:<br class="">
<br class="">
Hey,<br class="">
<br class="">
Depends on your OS you will need to installthe  ipset package.<br class="">
Try to run "apt-get install ipset".<br class="">
And then run the script.<br class="">
<br class="">
Eliezer<br class="">
<br class="">
----<br class="">
http://ngtech.co.il/lmgtfy/<br class="">
Linux System Administrator<br class="">
Mobile: +972-5-28704261<br class="">
Email: mailto:eliezer@ngtech.co.il<br class="">
<Untitled Attachment 1.jpg><br class="">
<br class="">
From: Sameh Onaissi [mailto:sameh.onaissi@solcv.com] <br class="">
Sent: Tuesday, December 6, 2016 5:23 PM<br class="">
To: Amos Jeffries <mailto:squid3@treenet.co.nz><br class="">
Cc: Eliezer Croitoru <mailto:eliezer@ngtech.co.il><br class="">
Subject: Re: [squid-users] Skype for Business behind a transparent squid<br class="">
(TProxy) HTTP/S<br class="">
<br class="">
Amos, thanks for the reply. <br class="">
<br class="">
<br class="">
This is getting more confusing.<br class="">
<br class="">
I changed the script to: http://pastebin.com/jLgywstg<br class="">
<br class="">
And I ran it, but I am getting errors:<br class="">
<br class="">
sudo sh http://bypass.sh/ + iptables -t mangle -L PREROUTING + grep<br class="">
bypasspool + [ 1 -ne 0 ] + iptables -t mangle -I PREROUTING -m set<br class="">
--match-set bypasspool dst,src -j DIVERT iptables http://v1.6.0/ Set<br class="">
bypasspool doesn't exist. Try `iptables -h' or 'iptables --help' for more<br class="">
information. + ipset create bypasspool hash:ip http://bypass.sh/ 10:<br class="">
http://bypass.sh/ ipset: not found + read item +<br class="">
echohttp://lyncdiscover.solcv.com/ http://lyncdiscover.solcv.com/ + host -4<br class="">
http://lyncdiscover.solcv.com/ + grep has address + awk {print $4} + xargs<br class="">
-l1 ipset add bypasspool xargs: ipset: No such file or directory + read item<br class="">
+ echo http://webdir0a.online.lync.com/http://webdir0a.online.lync.com/ +<br class="">
host -4 http://webdir0a.online.lync.com/ + grep has address + awk {print $4}<br class="">
+ xargs -l1 ipset add bypasspool xargs: ipset: No such file or directory<br class="">
<br class="">
. this goes on the same for all the domains in the text file<br class="">
<br class="">
My iptables is still <http://pastebin.com/SqpbmYQQ><br class="">
<br class="">
I did not quite understand what you meant by <br class="">
You should test whether -m set or -m socket work faster and put that one<br class="">
first. My change above places it at line 2 (after -m socket) assuming<br class="">
your iptables script is still <http://pastebin.com/SqpbmYQQ><br class="">
<br class="">
should I incorporate the bypass script into my iptables.sh script? run<br class="">
iptables first then bypass?<br class="">
<br class="">
<br class="">
<br class="">
On a side note, would adding ssl_bump exceptions to squid.conf do it?<br class="">
Something like: <br class="">
<br class="">
acl skype_domains <path to file><br class="">
ssl_bump splice skype_domains<br class="">
ssl_bump bump all<br class="">
<br class="">
<br class="">
<br class="">
Again, thanks again for your help.<br class="">
<br class="">
<br class="">
<br class="">
<Untitled Attachment 2.jpg> Piensa en el medio ambiente antes de imprimir<br class="">
este email.<br class="">
<br class="">
On Dec 6, 2016, at 9:50 AM, Amos Jeffries <mailto:squid3@treenet.co.nz><br class="">
wrote:<br class="">
<br class="">
On 7/12/2016 3:19 a.m., Sameh Onaissi wrote:<br class="">
Hello,<br class="">
<br class="">
I tried doing the changes to nat/REDIRECT in iptables.sh and I must have<br class="">
messed up somewhere, so I am sticking with mangle/tproxy for now since squid<br class="">
is working with them.<br class="">
<br class="">
How can I change Eliezer's script to mangle/tproxy?<br class="">
https://gist.github.com/elico/e0faadf0cc63942c5aaade808a87deef<br class="">
<br class="">
Excuse my novice knowledge in iptables.<br class="">
<br class="">
No worries.<br class="">
<br class="">
You need to change where iptables attaches the 'bypasspool'. Both the<br class="">
table/location (-t) and the jump/action (-j).<br class="">
<br class="">
iptables -t mangle -L PREROUTING |grep bypasspool<br class="">
if [ "$?" -ne "0" ];then<br class="">
<br class="">
  iptables -t mangle -I 2 PREROUTING \<br class="">
    -m set --match-set bypasspool dst,src \<br class="">
    -j DIVERT<br class="">
<br class="">
fi<br class="">
<br class="">
You should test whether -m set or -m socket work faster and put that one<br class="">
first. My change above places it at line 2 (after -m socket) assuming<br class="">
your iptables script is still <http://pastebin.com/SqpbmYQQ><br class="">
<br class="">
(Your script should do that line adding, not Eliezers - so that you can<br class="">
be sure the order is always correct).<br class="">
<br class="">
<br class="">
BTW: you should use iptables-save / iptables-restore instead of a slow<br class="">
script calling iptables "manually". Those other tools will ensure there<br class="">
are no gaps in the firewall initialization for nasty traffic to sneak<br class="">
through.<br class="">
<br class="">
I am looking at access.log to collect all domains I see heading to skype for<br class="">
business, as well as IPs. My question is, can I add the domains AND IPs into<br class="">
the domains-to-bypass.txt that the above script uses?<br class="">
<br class="">
IIRC you should be able to use domain as the parameter to ipset. But it<br class="">
will resolve the domain immediately and only add those IPs that it finds<br class="">
at that time into the pool. Any future changes, or a hidden set of IPs<br class="">
that rotate in/out will not be listed.<br class="">
<br class="">
Amos<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>