Curl can provide us the following time report: time_namelookup time_redirect time_connect time_appconnect time_pretransfer time_starttransfer time_total To get these report time, you need to use the option -w , here is an example: curl -L –output /dev/null –silent –show-error –w ‘lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n’ ‘google.com’ By default Smokeping Curl probe only fetch the load time – that is total_time – dns resolution. There are many occasions we have with DNS lookup, so we can’t find that issue. That’s why we have “AnotherCurl” probe , the big difference is the “write_out” option , AnotherCurl allows us to specify which the probe will report.Read More →

My Strongswan : Local IP: 172.30.0.37 Elastic IP: 19.215.188.2 OS: Ubuntu My WAN: Customer grade broadband Internet Public IP:28.77.250.17 – connect to my fiber optics Local gateway IP: 192.168.1.100 we need to setup porftforwarding : UDP port 4500,500, to our router interface 192.16.1.108 My Cisco: Cisco 1841 fa0/1 : 192.168.1.108  – connect to My WAN router local interface fa0/0: 172.16.8.254 – connect to my local switch / pc My Strongswan config: /etc/ipsec.conf config setup # strictcrlpolicy=yes # uniqueids = no conn %default ikelifetime=1440m keylife=60m rekeymargin=3m keyingtries=1 keyexchange=ikev1 authby=secret conn myremoteoffice left=172.30.0.37 #strongswan outside address leftsubnet=172.30.0.0/24,0.0.0.0/0 #network behind strongswan leftid=19.215.188.2 #IKEID sent by strongswan leftfirewall=yes right=28.77.250.17Read More →

i have 2 sites vpn between Strongswan and Cisco 1841 , the vpn works well , but there is a problem , some of ssl website could not open , after some research it turned out that’s the mtu issue. this is how i fix: conf t int fa0/1 ip mtu 1500 int fa0/0 ip mtu 1500 In case of yahoo, i need to update this on strongswan server: $ iptables -t mangle -A FORWARD -o eth0 \ -p tcp -m tcp –tcp-flags SYN,RST SYN \ -m tcpmss –mss 1361:1536 \ -j TCPMSS –set-mss 1360 $ echo 1 >/proc/sys/net/ipv4/ip_no_pmtu_disc For your reference: MTU woes inRead More →

When we apply an access-list to our router/switch, take this note: To apply an access list to a virtual terminal interface we must use the “access-class” command.  This is used when we want to limit the access to our management interface. To apply an access list to a physical interface, we must use the “access-group” command.Read More →

Let say we have a router , it’s connected to internet via interface Fa0/1.  For security reason, we don’t want internet use to ping our router. We need to disable icmp , this could be done through access list. Router#conf t Router(config)#ip access-list extended acl-internet-in Router(config)#deny icmp any any echo Router(config)#permit ip any any Router(config)#end Then we need to apply this access list to our internet interface : Fa/01 Router#conf t Router(config)#int fa0/1 Router(config)#ip access-list acl-internet-in in Router(config)#end  Read More →

I have some videos that i want other people to download it instead of playing it on the browsers. First, i just try to upload that file to my web document folder and share the link, i found that the user can watch the video directly, this is not what i want, i want the user to download it to their computer, then watch it from their computer later. I did some research and i found that there is a very easy way to accomplish, you just need add the following like to .htaccess file AddType application/octet-stream .mpg AddType application/octet-stream .mov AddType application/octet-stream .mp4 ThisRead More →