Permalink
Browse files

update 2013-08-23

  • Loading branch information...
1 parent f7d0b47 commit 610c440924b6fa101e5ee9d3be1249053a5e27a8 @qnikst committed Aug 23, 2013
View
@@ -130,7 +130,7 @@ <h2 id="перевод-типов-данных-друг-в-друга">Пере
<hr />
<div class="pull-right">
<em>Alexander Vershilov</em>
- <a href="http://creativecommons.org/licenses/by-nc-sa/3.0"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
+ none
</div>
<br class="clearfix" />
@@ -197,7 +197,7 @@ <h1>2012-05-29-creating-yesod-site <br /><small><strong>May 29, 2012</strong></s
<hr />
<div class="pull-right">
<em>qnikst</em>
- <a href="http://creativecommons.org/licenses/by-nc-sa/3.0"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
+ none
</div>
<br class="clearfix" />
@@ -415,7 +415,7 @@ <h1>Multiple event listeners</h1>
<hr />
<div class="pull-right">
<em>Alexander Vershilov</em>
- <a href="http://creativecommons.org/licenses/by-nc-sa/3.0"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
+ none
</div>
<br class="clearfix" />
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - Using stacked runlevel in openrc.</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+ <div class="page-header">
+ <h1>Using stacked runlevel in openrc. <br /><small><strong>August 29, 2013</strong></small></h1>
+</div>
+
+<h1 id="abstract">Abstract</h1>
+<h1 id="introduction">Introduction</h1>
+<h1 id="the-problem">The problem</h1>
+<p>The problems that stacked runlevels can solve</p>
+<h1 id="idea">Idea</h1>
+<h1 id="details">Details</h1>
+<h1 id="related-work">Related work</h1>
+<h1 id="conclution">Conclution</h1>
+<hr />
+<div class="pull-right">
+ <em>Alexander Vershilov</em>
+ cc-nc-sa
+</div>
+<br class="clearfix" />
+
+
+<div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'qnikst'; // required: replace example with your forum shortname
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - Using ebtables to use internet connection in guest OS</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+ <div class="page-header">
+ <h1>Using ebtables to use internet connection in guest OS <br /><small><strong>August 12, 2013</strong></small></h1>
+</div>
+
+<h1 id="abstract">Abstract</h1>
+<p>In this post I address the problem of having internetconnections for in guests systems in case of using wifi or mixed connections. It’s a common situation for laptops and other wifi devices.</p>
+<h1 id="idea">Idea</h1>
+<p>The common sulution with bridge creation doesn’t work as wifi adapters doesn’t support mac changin (and thus bridging) by design. The common solution in this case is <code>ebtables</code>.</p>
+<pre><code>+------+
+| lvm1 | ----+
++------+ | +-------+ +------+
+ +---+ tun + | eth0 |------&gt; Internel
+ | +--+----+ +---+--+
++------+ | | |
+| lvm2 |-----+ +------[ bridge ]---+
++------+ |
+ ebtales
+ |
+ [ wlan0 ]--------------&gt; Internet</code></pre>
+<h2 id="realization">Realization</h2>
+<ol style="list-style-type: decimal">
+<li>Verify that you have all required kernel options:</li>
+</ol>
+<ul>
+<li>ebtables support</li>
+<li>snat support</li>
+<li>maybe more</li>
+</ul>
+<ol start="2" style="list-style-type: decimal">
+<li><p>Install ebtales</p>
+<p># emerge ebtables</p></li>
+<li><p>Add ebtables option:</p>
+<p># ebtables -t nat -A POSTROUTING -o wlan0 -j snat –to-src <wlan0_mac><br /> –snat-arp ACCEPT #</p></li>
+<li><p>Save ebtables table</p>
+<p># /etc/init.d/ebtables save</p></li>
+<li><p>Start ebtables</p>
+<p># /etc/init.d/ebtables start</p></li>
+</ol>
+<p>Optional:</p>
+<p>Add ebtables to default runlevel: rc-update add ebtables default</p>
+<h1 id="additional">Additional</h1>
+<p>I have more compicated situation because I’m using eth0 at home and wifi in university or guest networks thus I need to use ebtables only when I have to ethernet connection. For this purpose I’ll use stacked runlevels I’ll describe it functionallity in the next posts. As an addition solution it’s possible to use ifup to check if ethernet cable exists and start ebtables script it there is no connection.</p>
+<p>Here are my current conf.d script:</p>
+<pre><code># LAN Network
+modules_eth0=&quot;ifconfig&quot;
+
+# Bridge for virtual networks
+config_br0=&quot;dhcp&quot;
+brctl_br0=&quot;
+ setfd 0
+ stp off
+&quot;
+bridge_br0=&quot;eth0&quot;
+RC_NEED_br0=&quot;net.eth0&quot;
+
+# Ethernet
+config_eth0=&quot;null&quot;
+
+# WIFI
+config_wlan0=&quot;dhcp&quot;
+wpa_supplicant_wlan0=&quot;-Dwext&quot;</code></pre>
+<h1 id="links">Links</h1>
+<p>[TODO] ebtables docs [TODO] nat docs [TODO] openrc page http://forums.gentoo.org/viewtopic-t-430571-start-0.html https://wiki.debian.org/BridgeNetworkConnections</p>
+<hr />
+<div class="pull-right">
+ <em>Alexander Vershilov</em>
+ cc-by-sa
+</div>
+<br class="clearfix" />
+
+
+<div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'qnikst'; // required: replace example with your forum shortname
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
View
@@ -136,7 +136,7 @@ <h1>Лекция 1 <br /><small><strong>unknown</strong></small></h1>
<hr />
<div class="pull-right">
<em>text by Vershilo A.B. <br /> lecture by Tsiganov A. V.</em>
- <a href="http://creativecommons.org/licenses/by-nc-sa/3.0"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
+ by-nc-nd
</div>
<br class="clearfix" />
View
@@ -172,8 +172,8 @@ <h2>переход к классическому пределу</h2>
<p><span class="math">\[y(x) = {}_2F_1 \left( \begin{matrix} -x_1-1 \\ N \end{matrix} \right|\left.\frac{1}{p}\right)\]</span></p>
<hr />
<div class="pull-right">
- <em>text by Vershilo A.B. <br /> lecture by Tsiganov A. V.</em>
- <a href="http://creativecommons.org/licenses/by-nc-sa/3.0"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
+ <em>text by Vershilov A.V. <br /> lecture by Tsiganov A. V.</em>
+ cc-nc-nd
</div>
<br class="clearfix" />
View
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - structure</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+ <div class="page-header">
+ <h1>structure <br /><small><strong>August 28, 2013</strong></small></h1>
+</div>
+
+<ol>
+<li><p>ABSTRACT</p></li>
+<li><p>Introduction</p></li>
+<li><p>The problem</p>
+<ul>
+<li><p>specific example</p></li>
+<li><p>bullet list of contributions</p></li>
+<li><p>forward references</p></li>
+</ul></li>
+<li><p>Idea.</p>
+<ul>
+<li><p>present example, then general solution</p></li>
+</ul></li>
+<li><p>Detail</p></li>
+<li><p>Related work</p></li>
+<li><p>Conclusions+further work</p></li>
+</ol>
+<hr />
+<div class="pull-right">
+ <em>Alexander Vershilov</em>
+ by-nc-nd
+</div>
+<br class="clearfix" />
+
+
+<div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'qnikst'; // required: replace example with your forum shortname
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
View
@@ -30,6 +30,10 @@
Recent posts
<ul>
<li>
+ <a href="./posts/2013-08-23-licenses-notes-in-hakyll.html">Adding license notes to blog pages.</a>
+ - <em>August 23, 2013</em> - by <em>Alexander Vershilov</em>
+</li>
+<li>
<a href="./posts/2013-08-08-openrc-supervision-using-cgroups.html">Supervision in pure OpenRC using cgroup subsystem.</a>
- <em>August 8, 2013</em> - by <em>Alexander Vershilov</em>
</li>
@@ -65,14 +69,10 @@
<a href="./posts/2013-02-01-phys-formulae.html">Формулы которые нужно знать</a>
- <em>February 1, 2013</em> - by <em>Alexander Vershilov</em>
</li>
-<li>
- <a href="./posts/2013-01-20-automata.html">2013-01-20-automata</a>
- - <em>January 20, 2013</em> - by <em>Alexander Vershilov</em>
-</li>
</ul>
-<p>Browse: <a href="./tags/OpenRC.html">OpenRC (1)</a>, <a href="./tags/cgroups.html">cgroups (1)</a>, <a href="./tags/gentoo.html">gentoo (2)</a>, <a href="./tags/hakyll.html">hakyll (1)</a>, <a href="./tags/haskell.html">haskell (7)</a>, <a href="./tags/latex.html">latex (1)</a>, <a href="./tags/linux.html">linux (2)</a>, <a href="./tags/pam.html">pam (1)</a>, <a href="./tags/phys.html">phys (1)</a>, <a href="./tags/programming.html">programming (1)</a>, <a href="./tags/projects.html">projects (1)</a>, <a href="./tags/resourcet.html">resourcet (1)</a>, <a href="./tags/supervision.html">supervision (1)</a>, <a href="./tags/univ.html">univ (1)</a>, <a href="./tags/web.html">web (1)</a></p>
+<p>Browse: <a href="./tags/OpenRC.html">OpenRC (1)</a>, <a href="./tags/cgroups.html">cgroups (1)</a>, <a href="./tags/gentoo.html">gentoo (2)</a>, <a href="./tags/hakyll.html">hakyll (2)</a>, <a href="./tags/haskell.html">haskell (8)</a>, <a href="./tags/latex.html">latex (1)</a>, <a href="./tags/linux.html">linux (2)</a>, <a href="./tags/pam.html">pam (1)</a>, <a href="./tags/phys.html">phys (1)</a>, <a href="./tags/programming.html">programming (1)</a>, <a href="./tags/projects.html">projects (1)</a>, <a href="./tags/resourcet.html">resourcet (1)</a>, <a href="./tags/supervision.html">supervision (1)</a>, <a href="./tags/univ.html">univ (1)</a>, <a href="./tags/web.html">web (1)</a></p>
<footer>
Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
View
@@ -30,6 +30,10 @@
<h1>All posts</h1>
<ul>
<li>
+ <a href="./posts/2013-08-23-licenses-notes-in-hakyll.html">Adding license notes to blog pages.</a>
+ - <em>August 23, 2013</em> - by <em>Alexander Vershilov</em>
+</li>
+<li>
<a href="./posts/2013-08-08-openrc-supervision-using-cgroups.html">Supervision in pure OpenRC using cgroup subsystem.</a>
- <em>August 8, 2013</em> - by <em>Alexander Vershilov</em>
</li>
Oops, something went wrong.

0 comments on commit 610c440

Please sign in to comment.