full of … these

openswan and sonicwall vpn tunnel

Posted: October 1st, 2009 | Author: | Filed under: howto, linux | Tags: , , , , | No Comments »

Two years ago I wrote an article about connecting openswan to checkpoint.

Here is a new example of connecting openswan to a sonicwall device.

ipsec.conf:

conn sonicwall
type=tunnel
# left=%defaultroute
left=serverip
leftsubnet=10.0.0.0/24
leftid=@macofserver #same on both ends
# leftxauthclient=yes
right=ipfosonicdevice
rightsubnet=192.168.0.0/24
# rightxauthserver=yes
rightid=@macsonicwall #add it as optional on the sonicwall interface
keyingtries=0
pfs=no
aggrmode=yes
auto=add
auth=esp
keyexchange=ike
esp=3des-sha1
ike=3des-sha1
authby=secret
# xauth=yes

ipsec.secrets:
@macofserver @macsonicwall : PSK "sasgSFgdasfg"

Start/Stop/Debugging:

ipsec setup --start
ipsec setup --stop
ipsec setup --restart

#after changes are made apply them
ipsec auto --replace sonicwall

#when debugging, it exists when it works
ipsec whack --name sonicwall --initiate

#after it works
ipsec auto --up sonicwall

Debug for phase1 and 2:
tcpdump -i eth0:0 host ipfosonicdevice
Logs:
tail -f /var/log/secure

References:
http://www.pelagodesign.com/blog/2009/05/18/ubuntu-linux-how-to-setup-a-vpn-connection-to-a-sonicwall-router-using-openswan-and-pre-shared-keys-psk/
http://www.sonicwall.com/downloads/SonicOS_Enhanced_to_Openswan_Using_GroupVPN_with_XAUTH.pdf


OpenWrt, limit the access to the internet

Posted: September 3rd, 2009 | Author: | Filed under: howto, linux | Tags: , , , , , , | No Comments »

I just tried a Linksys WRT54GL. It’s nice, but what if you have to add hotspot services on it.
I have installed Coova for fun.
A common scenario is to have anonymous clients accessing it with all kind of systems, all kind of software and, of-course, viruses trojans.
So, just to be prepared you want to allow access only to a few ports: 80 (http), 443 (https), 5222 (jabber), 5050 (yahoo messenger), 1863 (MSN), etc.

All you have to do is to add the following two lines in /etc/firewall.user below “Allow SSH on the WAN interface” section:
iptables -A forwarding_rule -i br0 -m multiport --dports 80,443,5222,5050,1863 -j ACCEPT
iptables -A forwarding_rule -i br0 -j DROP

Now restart the firewall:
/etc/init.d/S35firewall restart
Test.

That’s all.


Fix drupal installation

Posted: July 15th, 2009 | Author: | Filed under: howto, linux | Tags: , , , | No Comments »

After you have filled the database name, user and pass nothing happens, the site wont go further to install the pages, but you have this kind of error in your apache error.log:

Call to undefined function user_access() in /var/www/html/.../includes/theme.inc

The solution is to download drupal directly on the server or to archive the files and upload them to the server as a single file.

This worked for me, hope this will help you.


Odd DHCP issue

Posted: February 14th, 2009 | Author: | Filed under: howto, idiots, linux | Tags: , , , , | No Comments »

Let’s assume you have a network with a dhcp service (on linux) distributing IPs for your computers.
Suddenly, nobody gets IP from the DHCP.
Probably, you’ll check logs to see whats wrong.
In the logs everything looks normal, except the high number of requests from every computer using dhcp in the network.

dhcpd: DHCPDISCOVER from 00:00:00:00:00:00 via eth0
dhcpd: DHCPOFFER on 192.168.x.x to 00:00:00:00:00:00 via eth0
dhcpd: DHCPREQUEST
dhcpd: DHCPACK

Static IP computers are working as expected.

The next thing you should do is to start wireshark or tcpdump (or any similar application).
Check for errors and odd messages.
In my case it was a second dhcpd service running for the same subnet on another server.
:)


Opensuse 11.0: how to fix sound and mic on dell vostro 1510

Posted: October 3rd, 2008 | Author: | Filed under: howto, linux | Tags: , , , , | 2 Comments »

Chris asked me to give more detail about what I did to make the sound work on my laptop.

Here is what I did after a fresh install of opensuse 11:

- first thing I did it was to install the wireless drivers
- install all available patches
- by reading and searching for a solution on google i have found this page very useful:
http://en.opensuse.org/SDB:AudioTroubleshooting

- I installed suggested packages by hitting:
rpm -q alsa alsa-utils alsa-firmware and I have made a test using
speaker-test -Dplug:front -c2 -l5 -twav as they mentioned, but the sound was interrupted.
- I ran alsaconf, but the same results
- Than I have added extra options to the config file: options snd-hda-intel enable=1 index=0 model=dell
- I restarted alsa daemon: rcalsasound restart and I was able to hear a clear sound
- I went to “Volume Control” in “Edit”->”Preferences” and I have added all available devices not checked, 5-6 or so. I have played around with the controls and I have setup the Front Mic boost and recording controls to 50% of the scale and in Options tab I have setup first “Input source” to Mic, and the second “Input source” to Front Mic.
- I restarted again alsa, and I could record me using “Sound recorder” scratching near by the camera.

I know, it’s a mess, but it did work.
In skype i have used the following configuration to listen and to be able to speak:
- Sound In: HDA Intel (hw:Intel,0)
- Sound Out: HDA Intel (hw:Intel,0)
- Ringing: Default device