Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, June 12, 2017

UFW: forward trafic on a port 8333 to different computer/ip and back

Full node is running on: ip_full_node Redirection is done on server: ip_of_uwf_server *nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-F
-A PREROUTING -i eth0 -p tcp --dport 8333 -j DNAT --to-destination ip_full_node:8333
-A POSTROUTING -p tcp -d ip_full_node --dport 8333 -j SNAT --to-source ip_of_uwf_server
-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
COMMIT
Based on: https://serverfault.com/a/586553

Friday, November 18, 2016

Ubuntu 16:10: No D-BUS daemon running for vnc session

Open xterm in the vnc, and execute the following: sudo dbus-launch --sh-syntax

Thursday, October 06, 2016

Ubuntu 16.04: openvpn dns leak

Direct copy from here:
https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1211110/comments/58

I had the problem with Ubuntu 16.04 out-of-the-box. After a full week of 12 hour days trying to resolve this issue, I was finally about to fix it. I made a longer post about it here:
http://askubuntu.com/questions/829204/dns-routing-fails-for-vpn-connections-on-ubuntu-16-04-out-of-the-box

Here's the abbreviated version.
Step 1: Goto GitHub and clone the following repo to your home folder:
https://github.com/masterkorp/openvpn-update-resolv-conf

Step 2: Move the .sh files from your cloned rep to the /etc/openvpn folder:
sudo chmod +x *.sh && sudo mv *.sh /etc/openvpn

Step 3: Run the following command to install new packages for DNS:
sudo apt-get install openresolv nscd unbound

Step 4: Append the following line to your OpenVPN Client Configuration files (*.ovpn or *.conf). I did this after the configuration directives but before my inline certs ( tag):

script-security 2
up "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
down "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"


This should resolve the DNS resolution problem. Dmitry has the right steps, but I needed the 2nd script for my system to update. Works like my 14.04 system... before I upgraded to 16.04...

Monday, May 09, 2016

Sunday, May 08, 2016

Scallion on Ubuntu 16.04: The predefined type `System.Object' is not defined

Compile scallion on Ubuntu 16.04 xbuild scallion.sln /p:TargetFrameworkVersion="v4.5" Without 4.5 target, geting following error: CSC: error CS0518: The predefined type `System.Object' is not defined

Thursday, May 05, 2016

Ubuntu 16.04: Tmux mouse scrolling

add to ~/.tmux.conf set -g mouse on
q to exit scroll mode.

Tuesday, May 03, 2016

Ubuntu16:04: Matlab cant change font size on plots

xorg fonts need to be installed. sudo apt install xfonts-100dpi xfonts-75dpi

Wednesday, April 20, 2016

Ubuntu 16.04 and Matlab 2016a: MATLAB has encountered an internal problem and needs to close

There is some problem with matlab UI GPU-based rendering on nvidia as this is causing this problem
Stack Trace (from fault):
[ 0] 0x00007f5bbc4a024d /usr/lib/nvidia-361-updates/libGLX_nvidia.so.0+00344653


The workaround is to launch matlab without GPU rendering: opt/MATLAB/R2016a/bin/matlab -softwareopengl

Thursday, April 14, 2016

Ubuntu: ssh to tor server

On the server:

Add this to /usr/tor/torrc HiddenServiceDir /var/lib/tor/sshd/
HiddenServicePort 22 127.0.0.1:22

Restart tor sudo service tor restart
Onion hostname file for the ssh service should be created sudo cat /var/lib/tor/sshd/hostname
Take note of the hostname
On the client:
Have tor browser running on the client.

Add this to ~/.ssh/config: host hidden hostname your_onion_hostname.onion
proxyCommand nc -x 127.0.0.1:9150 %h %p

Wednesday, April 13, 2016

Saturday, April 09, 2016

Ubuntu 16:04: Install Krusader with dependencies

sudo apt install krusader krename kdiff3 konsole kde-baseapps-bin Without kde-baseapps-bin, bookmarks manager does not work.

Tuesday, March 29, 2016

Ubuntu 16:04: wt-3.3.5 compile error

When compiling latest wt-3.3.5, the following compile errors can occure: usr/include/boost/core/ref.hpp:131:74: note: candidate: template const boost::reference_wrapper boost::ref(T&)
template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t )

^
/usr/include/boost/core/ref.hpp:131:74: note: template argument deduction/substitution failed:
/tmp/wt-3.3.5/test/dbo/DboTest.C: In substitution of ‘template const boost::reference_wrapper
boost::ref(T&) [with T = dbo_test26::test_method()::CheckExpected]’:
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: required from here
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: template argument for ‘template const
boost::reference_wrapper boost::ref(T&)’ uses local type ‘dbo_test26::test_method()::CheckExpected’ model->dataChanged().connect(boost::bind(boost::ref(checkExpected),
^
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: trying to instantiate ‘template const
boost::reference_wrapper boost::ref(T&)’


This can be fixed, by compiling with C++11 mode: cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11"

To specify prefix folder (i.e., installation folder): cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt"

To build wt libraries as static (i.e. *.a), do: cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt" -DSHARED_LIBS=0

Saturday, March 26, 2016

Ubuntu 16:04: Segmentation fault (core dumped), but no core file

Make core files to be located in the current working folder sudo service apport stop
ulimit -c unlimited

Thursday, November 05, 2015

rsync: copy files with a given extensions

rsync -zarv --include="*/" --include="*.h" --exclude="*" --prune-empty-dirs /home/marcin/cpp/bitmonero ./test

Friday, October 23, 2015

Make python 3 virtual envirnoment on Ubuntu 15.10

sudo apt-get install python3-venv python3 -m venv ~/mypy34env/ source ~/mypy34env/bin/activate And then install python packages using pip, for example, pip install ipython

Saturday, September 05, 2015

Ubuntu: vncviewer command line tool install

the vncviewer command program is in this package:sudo apt-get install xtightvncviewer to use it vncviewer with ssh tunnel: vncviewer -via remoteusername@vncserverip localhost:1

Friday, August 28, 2015

Ubuntu: vncviewer through ssh

vncviewer -via remoteusername@vncserverip localhost:1

Wednesday, August 26, 2015

Ubuntu: Start chromium in new profile / instance

chromium-browser --enable-udd-profiles --user-data-dir=~/.newchromeprofile

Sunday, August 23, 2015

Compile latest bitmonero source on Ubuntu 14.04

The gist shows how to compile latest monero source code on Ubuntu 14.04.