check detail of ip with ifconfig

iptables -t nat -A POSTROUTING -o phone-conn -j MASQUERADE
iptables -A FORWARD -i phone-conn -o eth0 -m state –state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o phone-conn -j ACCEPT

also do not forget to set dns

https://www.cyberciti.biz/faq/howto-linux-bsd-unix-set-dns-nameserver/

I got this idea when I was reading this page

Share iPhone’s internet to Home network using a Raspberry Pi

0

First, add the GPG key for the official Docker repository to the system:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Continue reading

0

Stuck and searching for terminal shortcuts, here I have got list of Life saving linux terminal shortcuts –

  1. Ctrl+a Move cursor to start of line
  2. Ctrl+e Move cursor to end of line
  3. Ctrl+b Move back one character
  4. Alt+b Move back one word
  5. Ctrl+f Move forward one character
  6. Alt+f Move forward one word
  7. Ctrl+d Delete current character
  8. Ctrl+w Cut the last word
  9. Ctrl+k Cut everything after the cursor
  10. Alt+d Cut word after the cursor
  11. Alt+w Cut word before the cursor
  12. Ctrl+y Paste the last deleted command
  13. Ctrl+_ Undo
  14. Ctrl+u Cut everything before the cursor
  15. Ctrl+xx Toggle between first and current position
  16. Ctrl+l Clear the terminal
  17. Ctrl+c Cancel the command
  18. Ctrl+r Search command in history – type the search term
  19. Ctrl+j End the search at current history entry
  20. Ctrl+g Cancel the search and restore original line
  21. Ctrl+n Next command from the History
  22. Ctrl+p previous command from the History

Ref: http://stackoverflow.com/questions/9679776/how-do-i-clear-delete-the-current-line-in-terminal

1+

Hi there, if are facing dead tmux session on ssh exit issue on raspberry, here it requires libpam-systemd, which is not included by default in minimal Jessie. I rebooted to enable it, but you may only have to relogin and / or restart systemd-logind.service. Install it with command apt-get install libpam-systemd

systemctl –user status

output (without libpam-systemd): Failed to create bus connection: Connection refused

output (with libpam-systemd):

● raspberrypi
State: running
Jobs: 0 queued
Failed: 0 units
Since: Tue 2017-02-14 06:04:15 UTC; 4s ago
CGroup: /user.slice/user-0.slice/[email protected]
├─739 /lib/systemd/systemd –user
└─746 (sd-pam)

0