{"id":864,"date":"2011-03-31T15:28:49","date_gmt":"2011-03-31T09:58:49","guid":{"rendered":"http:\/\/judepereira.com\/blog\/?p=864"},"modified":"2011-03-31T15:28:49","modified_gmt":"2011-03-31T09:58:49","slug":"qemu-quick-networking-for-tcpudp","status":"publish","type":"post","link":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/","title":{"rendered":"QEMU | Quick Networking for TCP\/UDP"},"content":{"rendered":"<p>Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let&#8217;s stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn&#8217;t it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?<\/p>\n<p>Well certainly yes. QEMU can do all this very easily.<\/p>\n<p>Cut the chase, hit the code:<br \/>\n[sourcecode lang=bash]<br \/>\n#!\/bin\/sh<br \/>\nqemu=&#8221;qemu-system-x86_64&#8243;<br \/>\ncpu_args=&#8221;-cpu qemu64 -smp 2&#8243;<br \/>\nmem_args=&#8221;-m 128M&#8221;<br \/>\ndrive=&#8221;-hda \/media\/fowlmanordisk1\/devel\/virtual\/red.tvway&#8221;<br \/>\nnet_args=&#8221;-net user -net nic,model=rtl8139&#8243;<br \/>\nredirs=&#8221;-redir tcp:8022::22&#8243;<br \/>\n${qemu} ${cpu_args} ${mem_args} ${drive} ${net_args} ${redirs} -nographic &#038;<br \/>\n[\/sourcecode]<br \/>\nis one of my virtual servers&#8217; running on Ubuntu server. Take a look at the network arguments:<br \/>\n-net user -net nic,model=rtl8139<br \/>\nPretty simple? The QEMU emulator runs an inbuilt DHCP server, if the guest recognises the network card, and requests the configuration from the DHCP server, it acquires the required IP address, and viola! Instant access to the outside world. The file \/etc\/resolv.conf still needs to be configured to your preferable DNS servers. OpenDNS is usually a good solution.<\/p>\n<p>Notice the -redir argument, it specifies that an issue to port 8022 on the outside be mapped to port 22 on the inside(guest). So basically you could <strong>ssh localhost -p 8022<\/strong> and get access to your guest machine.<\/p>\n<p>The -redir is as follows(from the QEMU manual pages):<\/p>\n<pre>\r\n-redir [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport\r\n         Redirect incoming TCP or UDP connections to the host port\r\n         hostport to the guest IP address guestaddr on guest port\r\n         guestport. If guestaddr is not specified, its value is x.x.x.15\r\n         (default first address given by the built-in DHCP server). By\r\n         specifying hostaddr, the rule can be bound to a specific host\r\n         interface. If no connection type is set, TCP is used. This\r\n         option can be given multiple times.\r\n<\/pre>\n<p><em>Enjoy virtual machines with QEMU.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let&#8217;s stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn&#8217;t it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box? Well [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[52,10],"tags":[168,167,166,169,170],"class_list":["post-864","post","type-post","status-publish","format-standard","hentry","category-code","category-linux","tag-guest-host-network","tag-networking","tag-qemu","tag-qemu-dhcp","tag-qemu-map-ports"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let&#039;s stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn&#039;t it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jude Pereira\"\/>\n\t<meta name=\"keywords\" content=\"qemu,networking,guest host network,qemu dhcp,qemu map ports,another snippet | code,gnu linux\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"@judepereira | Fleeting Thoughts\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"QEMU | Quick Networking for TCP\/UDP | @judepereira\" \/>\n\t\t<meta property=\"og:description\" content=\"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let&#039;s stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn&#039;t it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-03-31T09:58:49+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-03-31T09:58:49+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@judebpereira\" \/>\n\t\t<meta name=\"twitter:title\" content=\"QEMU | Quick Networking for TCP\/UDP | @judepereira\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let&#039;s stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn&#039;t it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@judebpereira\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#article\",\"name\":\"QEMU | Quick Networking for TCP\\\/UDP | @judepereira\",\"headline\":\"QEMU | Quick Networking for TCP\\\/UDP\",\"author\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"},\"datePublished\":\"2011-03-31T15:28:49+05:30\",\"dateModified\":\"2011-03-31T15:28:49+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":5,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#webpage\"},\"articleSection\":\"another snippet | code, gnu linux, guest host network, networking, qemu, qemu dhcp, qemu map ports\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"gnu linux\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/linux\\\/#listItem\",\"position\":2,\"name\":\"gnu linux\",\"item\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#listItem\",\"name\":\"QEMU | Quick Networking for TCP\\\/UDP\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#listItem\",\"position\":3,\"name\":\"QEMU | Quick Networking for TCP\\\/UDP\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"gnu linux\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\",\"name\":\"Jude Pereira\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Jude Pereira\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#webpage\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/\",\"name\":\"QEMU | Quick Networking for TCP\\\/UDP | @judepereira\",\"description\":\"Networking with a guest in QEMU is often a headache, TUN\\\/TAP, seriously? Too hectic, let's stick to the basics, TCP\\\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/qemu-quick-networking-for-tcpudp\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2011-03-31T15:28:49+05:30\",\"dateModified\":\"2011-03-31T15:28:49+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/\",\"name\":\"@judepereira\",\"description\":\"Fleeting Thoughts\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"QEMU | Quick Networking for TCP\/UDP | @judepereira","description":"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let's stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?","canonical_url":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/","robots":"max-image-preview:large","keywords":"qemu,networking,guest host network,qemu dhcp,qemu map ports,another snippet | code,gnu linux","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#article","name":"QEMU | Quick Networking for TCP\/UDP | @judepereira","headline":"QEMU | Quick Networking for TCP\/UDP","author":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/judepereira.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"},"datePublished":"2011-03-31T15:28:49+05:30","dateModified":"2011-03-31T15:28:49+05:30","inLanguage":"en-US","commentCount":5,"mainEntityOfPage":{"@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#webpage"},"isPartOf":{"@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#webpage"},"articleSection":"another snippet | code, gnu linux, guest host network, networking, qemu, qemu dhcp, qemu map ports"},{"@type":"BreadcrumbList","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/judepereira.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/linux\/#listItem","name":"gnu linux"}},{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/linux\/#listItem","position":2,"name":"gnu linux","item":"https:\/\/judepereira.com\/blog\/category\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#listItem","name":"QEMU | Quick Networking for TCP\/UDP"},"previousItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#listItem","position":3,"name":"QEMU | Quick Networking for TCP\/UDP","previousItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/linux\/#listItem","name":"gnu linux"}}]},{"@type":"Person","@id":"https:\/\/judepereira.com\/blog\/#person","name":"Jude Pereira","image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"}},{"@type":"Person","@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author","url":"https:\/\/judepereira.com\/blog\/author\/admin\/","name":"Jude Pereira","image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"}},{"@type":"WebPage","@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#webpage","url":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/","name":"QEMU | Quick Networking for TCP\/UDP | @judepereira","description":"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let's stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/judepereira.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/#breadcrumblist"},"author":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"datePublished":"2011-03-31T15:28:49+05:30","dateModified":"2011-03-31T15:28:49+05:30"},{"@type":"WebSite","@id":"https:\/\/judepereira.com\/blog\/#website","url":"https:\/\/judepereira.com\/blog\/","name":"@judepereira","description":"Fleeting Thoughts","inLanguage":"en-US","publisher":{"@id":"https:\/\/judepereira.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"@judepereira | Fleeting Thoughts","og:type":"article","og:title":"QEMU | Quick Networking for TCP\/UDP | @judepereira","og:description":"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let's stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?","og:url":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/","og:image":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png","og:image:secure_url":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png","og:image:width":512,"og:image:height":512,"article:published_time":"2011-03-31T09:58:49+00:00","article:modified_time":"2011-03-31T09:58:49+00:00","twitter:card":"summary","twitter:site":"@judebpereira","twitter:title":"QEMU | Quick Networking for TCP\/UDP | @judepereira","twitter:description":"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let's stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?","twitter:creator":"@judebpereira","twitter:image":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png"},"aioseo_meta_data":{"post_id":"864","title":"QEMU | Quick Networking for TCP\/UDP | #site_title","description":"Networking with a guest in QEMU is often a headache, TUN\/TAP, seriously? Too hectic, let's stick to the basics, TCP\/UDP based. Instead of setting up a really complex set of configuration files, wouldn't it be easy to just emulate the network card, DHCP the guest, and let it work right out of the box?","keywords":[{"label":"qemu","value":"qemu"},{"label":"networking","value":"networking"},{"label":"guest host network","value":"guest host network"},{"label":"qemu dhcp","value":"qemu dhcp"},{"label":"qemu map ports","value":"qemu map ports"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-25 19:04:20","updated":"2025-06-03 20:05:51","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/judepereira.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/judepereira.com\/blog\/category\/linux\/\" title=\"gnu linux\">gnu linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tQEMU | Quick Networking for TCP\/UDP\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/judepereira.com\/blog\/"},{"label":"gnu linux","link":"https:\/\/judepereira.com\/blog\/category\/linux\/"},{"label":"QEMU | Quick Networking for TCP\/UDP","link":"https:\/\/judepereira.com\/blog\/qemu-quick-networking-for-tcpudp\/"}],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pqtyx-dW","jetpack-related-posts":[{"id":903,"url":"https:\/\/judepereira.com\/blog\/usrlocalbinwaitpid\/","url_meta":{"origin":864,"position":0},"title":"\/usr\/local\/bin\/waitpid","author":"Jude Pereira","date":"April 26, 2011","format":false,"excerpt":"A quick script to wait for a certain pid, then once that quits, execute a command. You may ask, why not just do command1 && command2 ? Well, if command1 exits with a non-zero exit status value, command2 will not get executed. Hence, I've brewed a quick script for this\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1918,"url":"https:\/\/judepereira.com\/blog\/sending-ota-updates-over-wifi-to-your-esp8266\/","url_meta":{"origin":864,"position":1},"title":"Sending OTA updates over WiFi to your ESP8266","author":"Jude Pereira","date":"December 21, 2020","format":false,"excerpt":"This Christmas, I added a whole bunch of lights powered by 5V power sources. My goal was to switch them on at sunset, and switch them off on sunrise, by using a MOSFET for power control :) While I was doing this, I wanted to send OTA updates of my\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":694,"url":"https:\/\/judepereira.com\/blog\/visual-basic-6-revisited-linux-wine\/","url_meta":{"origin":864,"position":2},"title":"visual basic 6 revisited &#8211; linux &#8211; wine","author":"Jude Pereira","date":"August 5, 2010","format":false,"excerpt":"Earlier this year, I had written an article on running Visual Basic 6 on linux under wine, this is an update for it, the prior one is deprecated Getting Visual Basic 6 to work on linux is pretty easy, not much trouble, all the basic things work, as of what\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1830,"url":"https:\/\/judepereira.com\/blog\/ios-mac-ipsec\/","url_meta":{"origin":864,"position":3},"title":"How to tunnel all traffic from your iOS device to your own server via IPSec","author":"Jude Pereira","date":"May 11, 2018","format":false,"excerpt":"TL;DR: A DigitalOcean droplet, strongSwan, and a custom Configuration Profile for iOS routes all the traffic from my iPhone via my droplet. Why? Just because I can. Note: This setup does not require you to download Apple Configurator and switch your iPhone into Supervised mode (we will create a configuration\u2026","rel":"","context":"In &quot;gnu linux&quot;","block_context":{"text":"gnu linux","link":"https:\/\/judepereira.com\/blog\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2018-05-10-at-20.34.32-1024x134.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2018-05-10-at-20.34.32-1024x134.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2018-05-10-at-20.34.32-1024x134.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":893,"url":"https:\/\/judepereira.com\/blog\/coloured-varlogmessages-at-tty12\/","url_meta":{"origin":864,"position":4},"title":"Coloured \/var\/log\/messages at tty12","author":"Jude Pereira","date":"April 26, 2011","format":false,"excerpt":"Reading logs could never become any more easier, at just a keystroke, you have your logs displayed where you want, in some fancy colour. They look great too. TTY's can be accessed by pressing Alt + Ctrl + F[1 - 12] simultaneously. In the following, you'll get a decent, colourized\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1675,"url":"https:\/\/judepereira.com\/blog\/sending-notifications-via-apples-new-http2-api-using-jetty-9-3-6\/","url_meta":{"origin":864,"position":5},"title":"Sending notifications via Apple&#8217;s new HTTP\/2 API (using Jetty 9.3.6)","author":"Jude Pereira","date":"January 9, 2016","format":false,"excerpt":"HTTP\/2 is still very much new to Java, and as such, there are just two libraries who support it - Jetty (from 9.3), and Netty (in alpha). If you're going the Jetty way (as I have), you'll need to add their ALPN library to your boot classpath. Note: Jetty 9.3.x\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":7,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":871,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions\/871"}],"wp:attachment":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}