Recent Notes
Displaying notes 181 - 190
Created by magnum on September 21, 2011 16:01:16
Last update: September 21, 2011 16:02:33
More like assign a second ip address to the same nic, instead of a virtual nic. Multiple IP addresses can be assigned to the same NIC, but all IP addresses must be on the same subnet - otherwise some IP addresses will not be accessible. From command line, assign IP address 192.168.0.2 to alias eth0:0 :
sudo ifconfig eth0:0 192.168.0.2 netmask 255.255.2... But IP addresses added this way are not persistent. They are lost whent he OS is restarted. To make the additions persistent: For Fedora: $ su - # cd /etc/sysconfig/network-scripts/ ... The contents of ifcfg-eth0:0 should look like this: DEVICE=eth0:0 IPADDR=192.168.0.2 NETMASK=255... Restart network: # service network restart For Ubuntu: $ sudo vi /etc/network/interfaces Append this to the file: auto eth0:0 iface eth0:0 inet static name Et......
Created by freyo on September 15, 2011 20:29:22
Last update: September 21, 2011 13:16:36
Usually network connectivity can be tested with ping and telnet . Android adb shell has ping but no telnet . But it has nc , which can be used in place of telnet .
# nc -z -v www.google.com 80
DNS fwd/rev mismat...
Created by freyo on September 15, 2011 16:23:14
Last update: September 21, 2011 13:06:00
These steps set up a PPP connection between an Android device and your Linux PC, so that the device can use the Internet connection of the PC. To share an Internet connection the other way around, reverse the roles of the PC and the device. Assuming the host will use IP address 192.168.0.1 and the device 192.168.0.2 : Prepare host for NAT and IP forwarding
$ sudo sysctl net.ipv4.ip_forward=1 $ sudo ipta... The first rule is inserted at the beginning of the NAT table. The second and third rules are inserted into the second place in the rules chain. Start PPP with adb $ sudo adb ppp "shell:pppd nodetach noauth noipdef... Add DNS server to device (get dns server ip address from /etc/resolve.conf ): $ adb shell # setprop net.dns1 192.168.33.1 ...
Created by magnum on September 21, 2011 12:35:14
Last update: September 21, 2011 12:35:14
NAME
brctl - ethernet bridge administration
SYNOPSIS
brctl [command]
DESCRIPTION
brctl is used to set up, maintain, and inspect the ethernet bridge configuration in the
linux kernel.
An ethernet bridge is a device commonly used to connect different networks of ethernets
together, so that these ethernets will appear as one ethernet to the participants.
Each of the ethernets being connected corresponds to one physical interface in the bridge.
These individual ethernets are bundled into one bigger ('logical') ethernet, this bigger
ethernet corresponds to the bridge network interface.
Created by magnum on September 19, 2011 08:52:35
Last update: September 20, 2011 09:14:02
This is a step-by-step guide: How to setup pptp vpn server on linux (fedora 14) It looks like that the only PPTP server on Linux that had any influence was Poptop , which was last updated in 2007. There doesn't seem to be much interest in keeping pptpd up-to-date on Linux, and the reason could be that PPTP itself isn't much secure. From Wikiperia : PPTP has been the subject of many security analyses and serious security vulnerabilities have been found in the protocol. The known vulnerabilities relate to the underlying PPP authentication protocols used, the design of the MPPE protocol as well as the integration between MPPE and PPP authentication for session key establishment. In fact, the maintainers of PPTP Client and Poptop recommend...
Created by freyo on May 13, 2011 15:45:29
Last update: September 20, 2011 08:08:12
This is an Android app that dumps any binarized xml file as plain text - to the sdcard on the device or emulator.
build.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project...
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<man...
res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<Lin...
res/values/strings.xml :
<?xml version="1.0" encoding="utf-8"?>
<res...
src/com/android/xmltool/DumpXml.java
package com.android.xmltool;
import java.ut...
Screenshot
Pre-built APK can be downloaded from: http://code.google.com/p/android-binxml-dump/
Created by Dr. Xi on September 19, 2011 16:15:19
Last update: September 19, 2011 16:15:19
By default, svn recursively adds new files into the repository:
$ svn add *
But you have to use " * ", using the dot (current directory) does not work (most likely the current directory is already versioned):
$ svn add .
Created by Dr. Xi on September 19, 2011 11:56:42
Last update: September 19, 2011 11:57:26
It is well known that with the -D switch you can turn an ssh session into a socks proxy:
ssh -D localhost:8080 remote_user@remote_host
Now configure your browser to use " localhost:8080 " as a socks proxy and your web traffic is routed through remote_host via an ssh tunnel.
But sometimes you encounter an error message like this:
Disconnecting: Bad packet length - 1416586337
This is because sometimes, the ssh session outputs some "welcome" message into the tunnel, polluting the protocol stream between the client and the remote host.
A safer way to establish an ssh socks proxy would be:
ssh -N -D localhost:8080 remote_user@remote_host
Created by magnum on September 19, 2011 08:33:40
Last update: September 19, 2011 08:34:25
From Control Panel , double click Network Connections , select New Connection...
Click Next in Connection Wizard , select Set up an advanced connection , click Next
Select Accept incoming connections , click Next
Select Allow virtual private connections , click Next
Check the users allowed for connection, or add a new VPN user by clicking Add . Click Next .
Select Internet Protocol (TCP/IP) and click Properties .
Check Allow callers to access my local area network , enter a TCP/IP address range and click OK
Click Next and Finish
Created by magnum on September 16, 2011 16:04:05
Last update: September 16, 2011 16:05:06
Linux distros come with PPTP client bundled. This is how to configure Linux as PPTP client:
Click System->Preferences->Network Connections:
Select the VPN tab, click Add :
Select PPTP from the list and click Create... :
To connecto to the PPTP VPN: click the Network icon on the launch Panel and select the VPN name just created.