<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Mon, 30 Mar 2015 15:59:00 +0100</lastBuildDate><item><title>RPM SPECS for Python CiscoConfParse</title><link>https://www.linickx.com/rpm-specs-for-python-ciscoconfparse</link><description>&lt;p&gt;Recently I have been using &lt;a href="http://www.pennington.net/py/ciscoconfparse/"&gt;ciscoconfparse&lt;/a&gt; to loop through Cisco configs, installing on my local laptop is straightforward with &lt;code&gt;pip&lt;/code&gt; however getting it onto a &lt;em&gt;customers&lt;/em&gt; linux jump server can be a bit more tricky (proxies, build deps and the like).&lt;/p&gt;
&lt;p&gt;For Redhat/Centos (6) boxes I found an out of date &lt;a href="http://anorien.csc.warwick.ac.uk/mirrors/OBS/warwick.ac.uk:/CSC:/Public/CentOS_6/src/python-ciscoconfparse-1.2.15-1.1.csc.src.rpm"&gt;.src.rpm&lt;/a&gt;  therefore I have updated the &lt;a href="http://www.rpm.org/max-rpm/ch-rpm-inside.html"&gt;SPEC&lt;/a&gt; file:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/files/2015/03/python-ciscoconfparse.spec"&gt;python-ciscoconfparse.spec&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have made two changes, I updated to the ciscoconfparse 1.2.16 and added the python-ipaddr dependency.&lt;/p&gt;
&lt;p&gt;To build your own yo will also need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/files/2015/03/python-setuptools_hg.spec"&gt;python-setuptools_hg.spec&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The only change I have made there is to add the correct download URL to the &lt;code&gt;Source&lt;/code&gt; so that it build without the human having to put the package in the right directory.... other than that all other build deps should be in the standard &lt;code&gt;base&lt;/code&gt; repositories.&lt;/p&gt;
&lt;p&gt;Building them is straight forward with &lt;code&gt;rebuild -ba&lt;/code&gt;, I have &lt;a href="https://www.linickx.com/rebuilding-rpms-getting-started-guide"&gt;an old post here&lt;/a&gt;... fedora have a much &lt;a href="https://fedoraproject.org/wiki/How_to_create_an_RPM_package"&gt;more comprehensive one here&lt;/a&gt;... I haven't uploaded pre-built RPMs &lt;a href="/files/rpm/"&gt;to my repo&lt;/a&gt; as I haven't found the need to for years, maybe this is a good excuse to resurrect it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick Bettison</dc:creator><pubDate>Mon, 30 Mar 2015 15:59:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2015-03-30:rpm-specs-for-python-ciscoconfparse</guid><category>Linux</category><category>Python</category><category>CentOS</category><category>Redhat</category><category>Cisco</category></item><item><title>CentOS/Redhat IPSEC and EC2</title><link>https://www.linickx.com/centosredhat-ipsec-and-ec2</link><description>&lt;p&gt;So it turns out my &lt;a href="https://www.linickx.com/archives/3181/5-minute-centosrhel-vpn"&gt;5 minute
vpn&lt;/a&gt;
doesn't work in EC2 because the ESP/AH protocols (50 and 51) are blocked
on the AWS network.&lt;/p&gt;
&lt;p&gt;This is no big deal tho, as &lt;a href="http://en.wikipedia.org/wiki/NAT-T"&gt;NAT-T&lt;/a&gt;
allows one to tunnel IPSEC over UDP... however getting it to work on
CentOS required a bit of a hack.&lt;/p&gt;
&lt;p&gt;If you have already tried setting up an IPSEC vpn, shut it down with
&lt;code&gt;ifdown ipsec1&lt;/code&gt; and remove your /etc/racoon/192.168.56.101.conf (&lt;em&gt;or
whatever IP yours is&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;To start the hack on BOTH boxes, you need to edit
/etc/sysconfig/network-scripts/ifup-ipsec. Around line 215 you need to
insert &lt;code&gt;nat_traversal force;&lt;/code&gt;... like this....&lt;/p&gt;
&lt;p&gt;BEFORE:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
        case "$IKE_METHOD" in
           PSK)
              cat &amp;gt;&amp;gt; /etc/racoon/$DST.conf &amp;lt;&amp;lt; EOF
        my_identifier address;
        proposal {
                encryption_algorithm $IKE_ENC;
                hash_algorithm $IKE_AUTH;
                authentication_method pre_shared_key;
                dh_group $IKE_DHGROUP;
        }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;AFTER:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
        case "$IKE_METHOD" in
           PSK)
              cat &amp;gt;&amp;gt; /etc/racoon/$DST.conf &amp;lt;&amp;lt; EOF
        my_identifier address;
        nat_traversal force;
        proposal {
                encryption_algorithm $IKE_ENC;
                hash_algorithm $IKE_AUTH;
                authentication_method pre_shared_key;
                dh_group $IKE_DHGROUP;
        }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Again, on both boxes update your
/etc/sysconfig/network-scripts/ifcfg-ipsec1 files so that AH is
disabled... because AH doesn't like NAT... like this....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash

[root@CentOS2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ipsec1 
DST=192.168.56.101
TYPE=IPSEC
ONBOOT=yes
IKE_METHOD=PSK
AH_PROTO=none
[root@CentOS2 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On your iptables policy make sure that UDP 500 and UDP 4500 are
permitted and volia.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# tcpdump -n -i eth1 port not 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
20:26:49.257590 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xa), length 116
20:26:49.261076 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xa), length 116
20:26:50.260942 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xb), length 116
20:26:50.262939 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xb), length 116
20:26:51.261298 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xc), length 116
20:26:51.264974 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xc), length 116
20:26:52.262289 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xd), length 116
20:26:52.265488 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xd), length 116
20:26:53.264008 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xe), length 116
20:26:53.267003 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xe), length 116
20:26:54.265655 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0xf), length 116
20:26:54.267264 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0xf), length 116
20:26:55.267459 IP 192.168.56.101.ipsec-nat-t &amp;gt; 192.168.56.102.ipsec-nat-t: UDP-encap: ESP(spi=0x08de7c32,seq=0x10), length 116
20:26:55.269678 IP 192.168.56.102.ipsec-nat-t &amp;gt; 192.168.56.101.ipsec-nat-t: UDP-encap: ESP(spi=0x03787bd0,seq=0x10), length 116
14 packets captured
14 packets received by filter
0 packets dropped by kernel
#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;IPSEC VPN Tunnelling over UDP.... done!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Thu, 27 Jan 2011 20:17:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2011-01-27:centosredhat-ipsec-and-ec2</guid><category>aws</category><category>centos</category><category>ec2</category><category>IPSEC</category><category>Linux</category><category>redhat</category><category>vpn</category></item><item><title>RedHat Cluster - How to Disable Fencing</title><link>https://www.linickx.com/redhat-cluster-how-to-disable-fencing</link><description>&lt;p&gt;I've spent far too long googling how to disable fencing.... I can only
guess that because you shouldn't really disable fencing no-one wants to
post a how to... so for the hard of hearing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do NOT disable fencing on your RedHat Cluster unless you really know
what you're doing! Fencing is designed to protect your data from
corruption, if you disable fencing your data is at RISK, you have been
warned!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I however am working on building a GFS DRBD cluster, as far as I can
gather DRBD doesn't need fencing, and the bottom line is my data is
personal data not mission critical and if my website goes down due to my
disabling fencing then it's no big deal.&lt;/p&gt;
&lt;p&gt;Rant over, here we go..... To disable fencing, create a custom fence
agent.&lt;/p&gt;
&lt;p&gt;Fence agents are simply scripts in /sbin, I've created /sbin/myfence and
here are the contents.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin.bash
echo "success: myfence $2"
exit 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, change your cluster.conf...&lt;/p&gt;
&lt;p&gt;If you're running SELINUX don't forget to update that! ... start with
&lt;code&gt;restorecon /sbin/myfence&lt;/code&gt; then update your policy.&lt;/p&gt;
&lt;p&gt;This is the policy I've created...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;module fenced 1.0;

require {
        type fenced_t;
        type shell_exec_t;
        class file { read execute };
}

#============= fenced_t ==============
allow fenced_t shell_exec_t:file { read execute };
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you save the above as fenced.te, then run this to install it..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;checkmodule -M -m -o fenced.mod fenced.te
semodule_package -o fenced.pp -m fenced.mod
semodule -i fenced.pp
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should now be able to start cman, fencing will start but will return
success for any fencing issues without actually doing anything!&lt;/p&gt;
&lt;p&gt;Happy non-fencing!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Tue, 25 Jan 2011 19:37:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2011-01-25:redhat-cluster-how-to-disable-fencing</guid><category>centos</category><category>cluster</category><category>fencing</category><category>howto</category><category>redhat</category><category>selinux</category></item><item><title>GRE example for CentOS/RHEL</title><link>https://www.linickx.com/gre-example-for-centosrhel</link><description>&lt;p&gt;I'm not sure why GRE isn't in &lt;a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces-other.html"&gt;RedHat's
Documentation&lt;/a&gt;,
but setting up a GRE tunnel between two RedHat boxes is quite straight
forward...&lt;/p&gt;
&lt;p&gt;On Host1 (192.168.56.101)...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-tun0 
DEVICE=tun0
BOOTPROTO=none
ONBOOT=no
TYPE=GRE
PEER_OUTER_IPADDR=192.168.56.102
PEER_INNER_IPADDR=192.168.168.2
MY_INNER_IPADDR=192.168.168.1
[root@CentOS1 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On host2 (192.168.56.102) ....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-tun0 
DEVICE=tun0
BOOTPROTO=none
ONBOOT=no
TYPE=GRE
PEER_OUTER_IPADDR=192.168.56.101
PEER_INNER_IPADDR=192.168.168.1
MY_INNER_IPADDR=192.168.168.2
[root@CentOS1 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bring the interfaces up....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS1 ~]# ifup tun0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;.. on host2...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS2 ~]# ifup tun0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And we're done! ... see the proof in the pudding below....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS1 ~]# ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-05-08-80-3C-00-00-00-00-00-00-00-00  
          inet addr:192.168.168.1  P-t-P:192.168.168.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1476  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:168 (168.0 b)  TX bytes:756 (756.0 b)

[root@CentOS1 ~]# ping 192.168.168.2
PING 192.168.168.2 (192.168.168.2) 56(84) bytes of data.
64 bytes from 192.168.168.2: icmp_seq=1 ttl=64 time=1.51 ms
64 bytes from 192.168.168.2: icmp_seq=2 ttl=64 time=2.13 ms
64 bytes from 192.168.168.2: icmp_seq=3 ttl=64 time=2.12 ms

--- 192.168.168.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 1.511/1.921/2.132/0.289 ms
[root@CentOS1 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The other end...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS2 ~]# ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-05-08-80-4C-00-00-00-00-00-00-00-00  
          inet addr:192.168.168.2  P-t-P:192.168.168.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1476  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3528 (3.4 KiB)  TX bytes:4536 (4.4 KiB)

[root@CentOS2 ~]# ping 192.168.168.1
PING 192.168.168.1 (192.168.168.1) 56(84) bytes of data.
64 bytes from 192.168.168.1: icmp_seq=1 ttl=64 time=4.39 ms
64 bytes from 192.168.168.1: icmp_seq=2 ttl=64 time=1.41 ms
64 bytes from 192.168.168.1: icmp_seq=3 ttl=64 time=2.57 ms

--- 192.168.168.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 1.419/2.795/4.393/1.224 ms
[root@CentOS2 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here we show the tunnelled packets...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
[root@CentOS1 ~]# tcpdump -n -i eth1 proto 47
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
13:45:59.429315 IP 192.168.56.102 &amp;gt; 192.168.56.101: GREv0, length 88: IP 192.168.168.2 &amp;gt; 192.168.168.1: ICMP echo request, id 55053, seq 7, length 64
13:45:59.429315 IP 192.168.56.101 &amp;gt; 192.168.56.102: GREv0, length 88: IP 192.168.168.1 &amp;gt; 192.168.168.2: ICMP echo reply, id 55053, seq 7, length 64
13:46:00.530528 IP 192.168.56.102 &amp;gt; 192.168.56.101: GREv0, length 88: IP 192.168.168.2 &amp;gt; 192.168.168.1: ICMP echo request, id 55053, seq 8, length 64
13:46:00.530686 IP 192.168.56.101 &amp;gt; 192.168.56.102: GREv0, length 88: IP 192.168.168.1 &amp;gt; 192.168.168.2: ICMP echo reply, id 55053, seq 8, length 64
13:46:01.418447 IP 192.168.56.102 &amp;gt; 192.168.56.101: GREv0, length 88: IP 192.168.168.2 &amp;gt; 192.168.168.1: ICMP echo request, id 55053, seq 9, length 64
13:46:01.418526 IP 192.168.56.101 &amp;gt; 192.168.56.102: GREv0, length 88: IP 192.168.168.1 &amp;gt; 192.168.168.2: ICMP echo reply, id 55053, seq 9, length 64

6 packets captured
6 packets received by filter
0 packets dropped by kernel
[root@CentOS1 ~]#
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since we can see the ICMP packets inside the GRE tunnel that show's us
that GRE is in clear text... to add some security &lt;a href="https://www.linickx.com/archives/3181/5-minute-centosrhel-vpn"&gt;setup a simple IPSEC
VPN&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;Reference:
&lt;a href="http://juliano.info/en/Blog:Memory_Leak/Bridges_and_tunnels_in_Fedora"&gt;http://juliano.info/en/Blog:Memory_Leak/Bridges_and_tunnels_in_Fedora&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 24 Jan 2011 18:02:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2011-01-24:gre-example-for-centosrhel</guid><category>centos</category><category>gre</category><category>redhat</category></item><item><title>Security updates only for Fedora 7 / RHEL &amp; Centos 5</title><link>https://www.linickx.com/security-updates-only-for-fedora-7-rhel-centos-5</link><description>&lt;p&gt;I found this on
&lt;a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/release-notes/RELEASE-NOTES-U1-ppc-en.html"&gt;redhat.com&lt;/a&gt;the
other day....&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is now possible to limit yum to install security updates only. To
do so, simply install the yum-security plugin and run the following
command:&lt;/p&gt;
&lt;p&gt;yum update --security&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hopefully this will allow fedora users to have the option of running a
"stable" install :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 24 Sep 2007 15:32:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-09-24:security-updates-only-for-fedora-7-rhel-centos-5</guid><category>Blog</category><category>centos</category><category>Fedora</category><category>Linux</category><category>redhat</category><category>Security</category></item><item><title>USB Networking with Fedora 7 &amp; n800</title><link>https://www.linickx.com/usb-networking-with-fedora-7-n800</link><description>&lt;p&gt;There are times where you cannot use WiFi, for example my workplace's
WLAN uses LEAP, which maemo doesn't support. I found that setting up USB
networking on my n800 was a bit of a pain since there isn't a single
document... if you check &lt;a href="http://del.icio.us/linickx"&gt;my del.icio.us
feed&lt;/a&gt; you'll see I bookmarked all I could
find with a &lt;a href="http://del.icio.us/linickx/usbnet"&gt;usbnet&lt;/a&gt; tag.&lt;/p&gt;
&lt;p&gt;These are the steps I ran through to enable usb networking between my
nokia n800 and my fedora 7 laptop.&lt;/p&gt;
&lt;p&gt;First we'll start with the basic setup... I'll assume you've read a
getting started article similar to
&lt;a href="https://www.linickx.com/blog/archives/292/n800-getting-started-n00b-guide-part-one/"&gt;mine&lt;/a&gt;
and already have root &amp;amp; xterm. By default n800 has a usb interface
configured, you just need to enable it, so on your n800 type:  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gainroot insmod /mnt/initfs/lib/modules/2.6.18-omap1/g_ether.ko ifup usb0&lt;/code&gt;&lt;br /&gt;
The default settings add an interface with a static ip of
192.168.2.15/24 with a default gateway of 192.168.2.14.&lt;/p&gt;
&lt;p&gt;Now lets set up something similar on Fedora, you need to create a file
in &lt;code&gt;/etc/sysconfig/network-scripts&lt;/code&gt; called &lt;code&gt;ifcfg-usb0&lt;/code&gt; with the
following...  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;DEVICE=usb0 BOOTPROTO=static IPADDR=192.168.2.14 BROADCAST=192.168.2.255 NETMASK=255.255.255.0 NETWORK=192.168.2.0 ONBOOT=no MII_NOT_SUPPORTED=no&lt;/code&gt;&lt;br /&gt;
Now plug the usb cable into both devices, and on your fedora box (&lt;em&gt;as
root&lt;/em&gt;) type&lt;br /&gt;
&lt;code&gt;ifup usb0&lt;/code&gt;&lt;br /&gt;
You now have connectivity, of course if you have a default fedora
install pinging 192.168.2.15 will fail because of the firewall, it is
probably best to temporarily disable the firewall
(&lt;code&gt;/etc/init.d/iptables stop&lt;/code&gt;) to see if it works, if so move onto
configuring your firewall correctly (&lt;code&gt;/etc/init.d/iptables start&lt;/code&gt;
&lt;em&gt;starts it again&lt;/em&gt;) :) You may also get usb conflicts, you can try&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rmmod uhci_hcd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;but it will disable any USB devices, you have been warned.&lt;/p&gt;
&lt;p&gt;With this basic connectivity setup you'll have two issues; you only have
connectivity between fedora &amp;amp; n800 nothing else works, and opening any
application on n800 causes it to try and connect to your wifi, so lets
look at those....&lt;/p&gt;
&lt;p&gt;I'm going to assume you used system-config-securitylevel to configure
your firewall, its worth noting that any changes you make now will be
overwritten by any future use of system-config-securitylevel so it's
probably best to take a backup of &lt;code&gt;/etc/sysconfig/ipatbles&lt;/code&gt; now and
later when you're finished.&lt;/p&gt;
&lt;p&gt;So as root type:  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;iptables -I RH-Firewall-1-INPUT 2 -i usb -j ACCEPT iptables -I FORWARD 1 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -I FORWARD 1 -s 192.168.2.0/24 -j ACCEPT iptables --table nat --append POSTROUTING --out-interface eth0 -s 192.168.2.0/24 -j MASQUERADE /etc/init.d/iptables save&lt;/code&gt;&lt;br /&gt;
This will allow all connectivity in from the usb interface allowing the
n800 to send packets into the fedora box whilst the firewall is running,
it will also NAT any traffic from the usb network hiding the n800 behind
fedora so that you get onward connectivity. To get the NAT to work you
need to enable ip forwarding, this allows fedora to pass pakets between
interfaces, to do that type&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and to get it to survive a reboot update &lt;code&gt;/etc/sysctl.conf&lt;/code&gt; with&lt;/p&gt;
&lt;p&gt;&lt;code&gt;net.ipv4.ip_forward = 1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The final part is to enable name resolution (DNS), on n800, I updated
&lt;code&gt;/etc/resolv.conf&lt;/code&gt; with the &lt;a href="http://www.opendns.com/"&gt;opendns&lt;/a&gt;
servers...&lt;br /&gt;
&lt;code&gt;nameserver 208.67.222.222 nameserver 208.67.220.220&lt;/code&gt;&lt;br /&gt;
All things being equal you should now be able to ping www.google.com
from your n800 :cool:&lt;/p&gt;
&lt;p&gt;To get applications to connect, I found on the latest version of ITOS
that the &lt;a href="http://maemo.org/community/wiki/dummyiap/"&gt;DUMMY IAP&lt;/a&gt; didn't
work, so I stumbled across &lt;a href="http://www.internettablettalk.com/forums/showpost.php?p=52174&amp;amp;postcount=5"&gt;this
solution&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Create an "ad hoc" wifi connection with static IPs... anything it
doesn't matter, and when that's connected in xterm (&lt;em&gt;as root&lt;/em&gt;) type
&lt;code&gt;ifconfig wlan0 down&lt;/code&gt; , you should now be able to connect to the web
with your browser / skype etc over your usb network... sweet!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Fri, 14 Sep 2007 18:14:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-09-14:usb-networking-with-fedora-7-n800</guid><category>770</category><category>Fedora</category><category>how to</category><category>Linux</category><category>maemo</category><category>n800</category><category>networking</category><category>Nokia</category><category>redhat</category><category>usb</category></item><item><title>Smolt RPM for CentOS, RHEL, etc</title><link>https://www.linickx.com/smolt-rpm-for-centos-rhel-etc</link><description>&lt;p&gt;I after installing Fedora7 I thought I'd take a look at &lt;a href="http://smolt.fedoraproject.org/stats"&gt;the
stats&lt;/a&gt; the project had gathered, I
saw some centos devices, but couldn't find a rpm.&lt;/p&gt;
&lt;p&gt;I've had a go at building one, it mostly works (&lt;a href="http://smolt.fedoraproject.org/show?UUID=251cf847-28b3-4d33-bb27-9fa6aecb5e61"&gt;this is my nagios
box&lt;/a&gt;),
it's a rebuild of the f7 source, I have to frig about with the spec
file, so I've published &lt;a href="https://www.linickx.com/files/rpm/whitebox/4/SRPMS/smolt-0.9.8.1-1.src.rpm"&gt;my source rpm
here&lt;/a&gt;,
search for Nick in the .spec file, you'll see my bodge.&lt;/p&gt;
&lt;p&gt;The smolt rpms are in &lt;a href="https://www.linickx.com/files/rpm/linickx-whitebox.repo"&gt;my yum
repo&lt;/a&gt;, feel free
to download the packages and have a go.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linickx.com/files/rpm/whitebox/4/i386/smolt-0.9.8.1-1.noarch.rpm"&gt;smolt-0.9.8.1-1.noarch.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;s&lt;a href="https://www.linickx.com/files/rpm/whitebox/4/i386/smolt-firstboot-0.9.8.1-1.noarch.rpm"&gt;molt-firstboot-0.9.8.1-1.noarch.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linickx.com/files/rpm/whitebox/4/i386/smolt-gui-0.9.8.1-1.noarch.rpm"&gt;smolt-gui-0.9.8.1-1.noarch.rpm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linickx.com/files/rpm/whitebox/4/i386/smolt-server-0.9.8.1-1.noarch.rpm"&gt;smolt-server-0.9.8.1-1.noarch.rpm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Fri, 06 Jul 2007 10:00:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-07-06:smolt-rpm-for-centos-rhel-etc</guid><category>centos</category><category>Enterprise Linux</category><category>Linux</category><category>redhat</category><category>rpm</category><category>smolt</category></item><item><title>HTTP Compression on Redhat / CentOS / Fedora</title><link>https://www.linickx.com/http-compression-on-redhat-centos-fedora</link><description>&lt;p&gt;I was doing some
&lt;a href="http://www.port80software.com/products/zipenable/compresscheck"&gt;testing&lt;/a&gt;
on my server the other day, and realised that http compression within
apache (httpd) was not enabled by default. Further digging showed me
that
&lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html"&gt;mod_defate&lt;/a&gt; was
what I needed, and infact it was installed by default on my CentOS box.&lt;/p&gt;
&lt;p&gt;How to enable mod_default on Centos: Create
&lt;strong&gt;/etc/httpd/conf.d/deflate.conf&lt;/strong&gt; with the following contents&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;     # Insert filter
     SetOutputFilter DEFLATE

     # Netscape 4.x has some problems...
     BrowserMatch ^Mozilla/4 gzip-only-text/html

     # Netscape 4.06-4.08 have some more problems
     BrowserMatch ^Mozilla/4.0[678] no-gzip

     # MSIE masquerades as Netscape, but it is fine
     BrowserMatch bMSIE !no-gzip !gzip-only-text/html

     # Don't compress images
     SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary

        # Don't compress already compressed stuff !
        SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
        SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary

     # Make sure proxies don't deliver the wrong content
     Header append Vary User-Agent env=!dont-vary

        # Log Stuff !
#        DeflateFilterNote Input input_info
#        DeflateFilterNote Output output_info
#        DeflateFilterNote Ratio ratio_info
#        LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
#        CustomLog /var/log/httpd/deflate_log deflate
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;restart httpd (&lt;strong&gt;/etc/init.d/httpd restart&lt;/strong&gt;) and your done :-)&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.port80software.com/products/zipenable/compresscheck"&gt;port80software.com -
    compresscheck&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html"&gt;apache.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch20_:_The_Apache_Web_Server"&gt;Linux Home
    Networking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.howtoforge.org/apache2_mod_deflate"&gt;How To Forge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Thu, 21 Jun 2007 16:37:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-06-21:http-compression-on-redhat-centos-fedora</guid><category>apache</category><category>centos</category><category>Fedora</category><category>Linux</category><category>redhat</category></item><item><title>Intel 3945ABG Wireless / WiFi Card on CentOS 5</title><link>https://www.linickx.com/intel-3945abg-wireless-wifi-card-on-centos-5</link><description>&lt;p&gt;I've taken to using CentOS on my servers, and fedora on my Laptop. New
job, means new laptop, and to avoid fedora update hell, I thought I'd
try CentOS on my laptop.&lt;/p&gt;
&lt;p&gt;All seems good other than my wifi card not being detected, and for some
reason googling for "&lt;a href="http://www.google.com/search?q=%22centos+5%22+intel+3945"&gt;centos 5 intel
3945&lt;/a&gt;" didn't
provide a working anserwer, actually I found the answer by googling for
"&lt;a href="http://www.google.com/search?q=Supplementary+disc+%22centos+5%22"&gt;supplementary disk centos
5&lt;/a&gt;"
which finds &lt;a href="http://www.centos.org/modules/newbb/viewtopic.php?post_id=26959&amp;amp;topic_id=8469"&gt;this
thread&lt;/a&gt;
that says...&lt;/p&gt;
&lt;p&gt;Install dag's repo (&lt;em&gt;&lt;a href="http://dag.wieers.com/rpm/packages/rpmforge-release/"&gt;this
rpm&lt;/a&gt;&lt;/em&gt;), and then
install dkms-ipw3945 (&lt;em&gt;yum will pick up the dependancies&lt;/em&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;yum install dkms-ipw3945
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next enable network manager...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;chkconfig --level 345 NetworkManager on
chkconfig --level 345 NetworkManagerDispatcher on
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;reboot (seriously) and when you next log in you'll get a little icon in
you system tray where you can manage your WiFi :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Thu, 24 May 2007 10:39:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-05-24:intel-3945abg-wireless-wifi-card-on-centos-5</guid><category>centos</category><category>Enterprise Linux</category><category>Linux</category><category>redhat</category><category>wireless</category></item><item><title>A Linux / Command line: how to upload to wordpress wp-plugins.org via subversion ( SVN )</title><link>https://www.linickx.com/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn</link><description>&lt;p&gt;Could that title get any longer !&lt;/p&gt;
&lt;p&gt;Hopefully you get the point, sometimes you need different tools for
different jobs, if you want a full development platform with SVN support
I suggest you take a look at &lt;a href="http://www.eclipse.org/"&gt;eclipse&lt;/a&gt; (&lt;em&gt;with
&lt;a href="http://subclipse.tigris.org/"&gt;subclipse&lt;/a&gt;&lt;/em&gt; ) but what if you already
have done the development and you just want to do a quick upload.&lt;/p&gt;
&lt;p&gt;My &lt;a href="https://www.linickx.com/index.php?content=php#phpbb_recent_topics.txt"&gt;phpbb_recent_topics
plugin&lt;/a&gt;
is hosted here, and when the nice guys at wordpress gave me an svn
account, I just wanted a quick way to upload what I've done. Now I must
stress this may not be the "proper" way to use svn (&lt;em&gt;there's &lt;a href="http://svnbook.red-bean.com/"&gt;a
book&lt;/a&gt; for that&lt;/em&gt;) but it is enough to
achieve what we want, a straight forward upload.&lt;/p&gt;
&lt;p&gt;I'm using redhat, so the 1st step was to install &lt;a href="http://dag.wieers.com/rpm/packages/subversion/"&gt;dag's subversion
rpm&lt;/a&gt; , I also needed to
setup an "editor" variable for commenting.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SVN_EDITOR=vi
export SVN_EDITOR
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, I went into a directory onto my server, and downloaded a copy of
the existing subversion directory structure.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[nick@SERVER wp_plugins]$ svn checkout https://svn.wp-plugins.org/phpbb-recent-topics/
A    phpbb-recent-topics/trunk
A    phpbb-recent-topics/branches
A    phpbb-recent-topics/tags
Checked out revision 9232.
[nick@SERVER wp_plugins]$
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My plugin (&lt;em&gt;at the time&lt;/em&gt;) was on version 1, so my 1st steps were to
create a version 1 tag, add it to svn, get the stable copy of my plugin,
add that to svn.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[nick@SERVER wp_plugins]$ cd phpbb-recent-topics/
[nick@SERVER phpbb-recent-topics]$ ls
branches  tags  trunk
[nick@SERVER phpbb-recent-topics]$ cd tags/
[nick@SERVER tags]$ mkdir 0.1
[nick@SERVER tags]$ cd ..
[nick@SERVER wp_plugins]$ svn add phpbb-recent-topics/tags/*
A         phpbb-recent-topics/tags/0.1
[nick@SERVER wp_plugins]$ cd phpbb-recent-topics/tags/0.1/
[nick@SERVER 0.1]$ wget https://www.linickx.com/files/php/phpbb_recent_topics.txt
[nick@SERVER 0.1]$ mv phpbb_recent_topics.txt phpbb_recent_topics.php
[nick@SERVER 0.1]$ svn add phpbb_recent_topics.php
A         phpbb_recent_topics.php
[nick@SERVER 0.1]$
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally I updated everything, and uploaded (committed) my files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[nick@SERVER 0.1]$ cd ../../../
[nick@SERVER wp_plugins]$ svn update phpbb-recent-topics/
At revision 9232.
[nick@SERVER wp_plugins]$ svn --username linickx commit phpbb-recent-topics/
Adding         phpbb-recent-topics/tags/0.1
Adding         phpbb-recent-topics/tags/0.1/phpbb_recent_topics.php
Transmitting file data .......
Committed revision 9233.
[nick@SERVER wp_plugins]$
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remember this doesn't publish your plugin on
&lt;a href="http://wordpress.org/extend/plugins/"&gt;wordpress.org&lt;/a&gt;, to do that you
need &lt;a href="http://wordpress.org/extend/plugins/about/readme.txt"&gt;a valid
readme.txt&lt;/a&gt; in the
trunk directory, but as you can see once you've created all the files on
your local box, it's just a few commands to get your work uploaded.&lt;/p&gt;
&lt;p&gt;&lt;small&gt; Did you notice that the wordpress svn supports SSL ? &lt;/small&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sun, 06 May 2007 16:47:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-05-06:a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn</guid><category>development</category><category>how to</category><category>Linux</category><category>plugin</category><category>redhat</category><category>WordPress</category></item></channel></rss>