Jump to content

omcaree

Members
  • Posts

    64
  • Joined

  • Last visited

Posts posted by omcaree

  1. Reviving the dead once again!

     

    I have brought the site back online, moved away from completed shell based (that's what killed the site last time around, a few people accessing at once just totally confused it). The site is now primarily php, but i'm re-introducing alot of the shell based stuff such as the xmms information. all the shell stuff will appear under

    "system".

     

    If there's a renewed interest in any of this, or anything else on the site then i'll create a new post and keep you up to date, if not then i'll just get on with it in silence :P

     

    Cheers,

     

    Owen Mc

  2. I will check the router config and see if there are any options i can see, but from what i remember there aren't.

     

    I have assigned the gateway manually in /ets/sysconfig/network but this doesn't work without the route commands.

     

    I have added the commands to the end of rc.local and everything is working, lets just hope BT don't decide to change it!

     

    Cheers for the input, if anyone has a miraculous sollution then let me know!

     

    Owen Mc

  3. Thanks for the replies.

     

    Ianw,

    The interface is eth3, and the ifcfg file is unchanged from the previous configuration:

    # cat /etc/sysconfig/network-scripts/ifcfg-eth3
    DEVICE=eth3
    BOOTPROTO=dhcp

     

    networking file is

    # cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=black-box.myftp.org

     

    no mention of gateways.

    The route command you use is the same as I attempted, however it does not work without first adding a route to the gateway. Is there no way for linux to pick up the gateway from DHCP?

     

    Gowator,

    I used to use DMZ on my previous internet set up, however, I can find no mention of DMZ on the BT Home Hub, The only mention of DMZ is on the "Assigned Public IP to a device" page. Here is what it says:

    Assign the public IP address of a connection to a LAN device

     

    This page allows you to assign the public IP address of your Internet Connection(s) to a specific device on your local network...

     

    You might want to do this if:

     

    * You encounter issues with some applications through the Network Address Translation engine of your BT Home Hub.

    * This device is running server applications (web server, ...) and you want it to be accessible from the internet.

    * This device has to be considered as the unique entry to your local network (DMZ).

     

    If DMZ was an option then I would be using this.

     

    Cheers,

     

    Owen

  4. Hey all,

     

    Sorry in advance for the vagueness of this post, but I don't actually know what is wrong I just have a feeling that something isn't working as it should. the story goes like this...

     

    I've had BT broadband for a while now, with one of those fancy home hub things which acts as a router. That was all fine, I had my linux router/server box connected to the home hub and then all my machines connected to my linux box. Ideally, however, I want my linux box connected straight to the internet, not connected behind the home hub. I've played around with the settings on the hub and discovered an option to "Assign the public IP address to a device" or something to that effect, now this is where the fun starts. I told the home hub to assign this address to my linux box, it then told me that i'd have to renew my IP address on my linux box (assigned by DHCP) in order to get the new details, so i did. A quick glance at ifconfig revieled that I did indeed have the external address, however nothing worked. Any attempt to ping anything just came back with "Network is unreachable". Now at this point I gave up because I couldn't be bothered to think up sollutions.

     

    However, since giving up, I have done the same thing (assigning public IP) to a windows machine, renewed my IP, and it works. As a result of that, I made a note of all the details which windows had received, and checked them against what linux had received, everything was fine appart from the fact that there was no reference to the default gateway on the linux machine. Now that is obviously the sollution to the unreachable network. I have managed to solve the problem by adding the default gateway myself, but this was not as straight forward as i had hoped.

     

    I attempted:

    route -n add default gw aaa.bbb.ccc.ddd

     

    but that just gave me:

    SIOCADDRT: Network in unreachable

     

    I guess this is because the public IP address of my home hub is completely different to the gateway address. so I tried the following:

    route -n add -net aaa.bbb.ccc.ddd netmask 255.255.255.255 eth3
    route -n add default gw aaa.bbb.ccc.ddd

     

    And this seems to work, I can now access anything. However this approach has resulted in the loopback devide going missing from the routing table and I cant figure out how to add it again.

     

    Also, why can my linux box not perform this operation for me? the default gateway must be broadcast correctly by DHCP because my windows machine receives it. Does linux just ignore it because it cant route to it directly? rather than attempting to route to it?

     

    The set up i currently have performs the above operation whenever the machine is reset, the problem is, if my ISP decide to change my gateway I am not going to know about it, other than the fact I have lost my connection. I will have to hook up my windows box, find the new gateway, and change it manually.

     

    Can anyone offer an explanation as to what exactly is going on? and if there is any way to fix it?

     

    If you need any more information just let me know.

     

    Cheers,

     

    Owen Mc

  5. Further to my last post, I performed route -n on PC1 and saved it to a shared folder. and here is the output of that (eth2 being connected to the internet, eth1 being the wired connection and eth0 being the wireless access point), and 192.168.1.254 being the address of the router/modem.

     

    Kernel IP routing table
    Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
    255.255.255.255 0.0.0.0		 255.255.255.255 UH	0	  0		0 eth0
    192.168.2.0	 0.0.0.0		 255.255.255.0   U	 10	 0		0 eth1
    192.168.1.0	 0.0.0.0		 255.255.255.0   U	 0	  0		0 eth2
    192.168.0.0	 0.0.0.0		 255.255.255.0   U	 10	 0		0 eth0
    0.0.0.0		 192.168.1.254   0.0.0.0		 UG	0	  0		0 eth2

     

    I have shorewall masquerading connections between the internet (eth2) and the other two interfaces.

  6. Correction, the first line is eth1 (eth0 has exactly the same config, and i opened the wrong file!)

     

    For the working (but slow), connection i get this:

     

    # route -n
    Kernel IP routing table
    Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
    192.168.2.0	 0.0.0.0		 255.255.255.0   U	 10	 0		0 eth1
    127.0.0.0	   0.0.0.0		 255.0.0.0	   U	 0	  0		0 lo
    0.0.0.0		 192.168.2.1	 0.0.0.0		 UG	10	 0		0 eth1

     

    Which looks ok to me?

     

    for the non working config I get this:

     

    route -n
    Kernel IP routing table
    Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
    127.0.0.0	   0.0.0.0		 255.0.0.0	   U	 0	  0		0 lo

     

    Which just proves that it isn't working? despite the fact that Mandriva can see the card, and configure it. It doesn't get an IP and so it cant see anything.

     

    manuallying configuring the non-working config yeilds this:

     

    ifconfig eth3
    eth3	  Link encap:Ethernet  HWaddr 00:0F:B5:06:55:16
    	  inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
    	  inet6 addr: fe80::20f:b5ff:fe06:5516/64 Scope:Link
    	  UP BROADCAST MULTICAST  MTU:1500  Metric:1
    	  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    	  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    	  collisions:0 txqueuelen:1000
    	  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    	  Interrupt:5 Base address:0xa000

     

    (note that the card has now become eth3 since i have removed it and replaced it again. I enabled my firewire devices which have taken up eth0 and eth2)

     

    route -n
    Kernel IP routing table
    Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
    192.168.2.0	 0.0.0.0		 255.255.255.0   U	 0	  0		0 eth3
    127.0.0.0	   0.0.0.0		 255.0.0.0	   U	 0	  0		0 lo

     

    and pinging the gateway:

    ping 192.168.2.1
    PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
    From 192.168.2.2 icmp_seq=1 Destination Host Unreachable
    From 192.168.2.2 icmp_seq=2 Destination Host Unreachable

  7. Hey all,

     

    I've been experiencing some strange problems with my network recently, since moving house/isps. I'll try to explain the situation as best I can, but feel free to ask for clarification!

     

    I have a computer connected to my DSL router (this router is effectively acting as just a modem), which acts as a router and a fileserver, I'll call this PC1. Connected to PC1 (via ethernet) I have my main PC (PC2) , and a wireless access point. I have dhcpd running on PC1, configured for two subnets: 192.168.2.x (interface connected to PC1) and 192.168.0.x (interface connected to the access point). When I connect my laptop (windows) via the access point, it gets an IP address of 192.168.0.201, and everything works perfectly, so I'm pretty happy that PC1 is working as its meant to.

     

    Right, onto PC2.

     

    PC2 has two NICs, both of which have been used on linux and windows before, so I dont think theres any compatability problems. when i connected the first NIC of PC2 to PC1, nothing happens, no activity lights, no dhcp info on PC2, and needless to say no connection. manually configuring PC2 (to 192.168.2.2) yeilds the same result. Mandriva recognises and configures the NIC fine, but it does nothing.

     

    the second NIC does one of three things (seeming randomly). either the same as the first NIC, no IP address, no connection. Or, it recieves its address via DHCP, but then cannot ping anything other than itself. Or, it recieves its address, takes a few minutes before it can ping anything, and then the connection works fine (can ping everything, DNS works, internet works), but the connection is very slow (not even fast enough to stream MP3s from PC1).

     

    I have just attempted an alternative configuration, that is plugging my laptop into the wired NIC on PC1 (incase this was somehow at fault), but my laptop receives an IP of 192.168.2.201 and everything works fine, and at full speed. So once again i'm quite happy with PC1's configuration and I think the problem lies with PC2.

     

    I currently have a working (but slow) connection on PC2, and this is what it looks like

     

    ifconfig eth1
    eth1   Link encap:Ethernet  HWaddr 00:50:8D:D5:D0:3D
    	  inet addr:192.168.2.253  Bcast:192.168.2.255  Mask:255.255.255.0
    	  inet6 addr: fe80::250:8dff:fed5:d03d/64 Scope:Link
    	  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    	  RX packets:2580 errors:0 dropped:0 overruns:0 frame:0
    	  TX packets:3892 errors:1 dropped:0 overruns:0 carrier:0
    	  collisions:0 txqueuelen:1000
    	  RX bytes:1489893 (1.4 MiB)  TX bytes:375431 (366.6 KiB)
    	  Interrupt:4 Base address:0xc000

    cat /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth0
    BOOTPROTO=dhcp
    ONBOOT=yes
    METRIC=10

     

    I will post similar details for the other occurances when they next crop up, in the mean time does anyone have a clue what could be going on? or even better, how to fix it?!

     

    Many Thanks,

     

    Owen Mc

  8. Hey all,

     

    I've been messing with this idea on and off for months but never got anything to work, until recently. For those who don't know a Captive Portal is a means of blocking all network traffic other than that on port 80 which is redirected to a page which asks the user to log in, once logged in the network is available to the machine which the user logged in from. Used to control access to wireless access points (such as those dotted around my uni campus).

     

    Now I faniced setting up an simple access point for some friends of mine who i'm sharing a house with. Rather than simply a secure wireless network, because by having user accounts to provide access to the network this access can be easily controlled (certain users having certain rights, regaurdless of what machine, IP, MAC, they access the network from).

     

    I attempted to configure a few of the acptive portal software packages that are around but failed in every attempt because they were far to complex for what I required.

     

    My bit of inspiration was as follows:

     

    Using shorewall to reject all traffic from the local (loc) zone and route port 80 to port 80 on my server which hosts a log in screen. Users log in, are authenitcated and then added to an "allowed" list. This roughly translates to the following:

     

    /etc/shorewall/rules:

    REDIRECT		loc:!$ALLOW_IPS 80	  tcp	 80
    REJECT  loc:!$ALLOW_IPS net	 tcp	 !80
    REJECT  net	 loc:!$ALLOW_IPS tcp	 !80

     

    Where ALLOW_IPS is set in /usr/share/shorewall/params and modified by scripts running on the server. More complex rules can also be added to shorewall to allow certain users access to certain ports, etc..

     

    I'd be interested if the experts amoung you could see any gaping holes in this concept. the configuration above is only basic and can be expanded on, but its the concet i'm interested in, yes it needs a bit of work, a webserver, some php, but I find this simpler than any packages which i've attempted to use (this is no doubt a reflection of my skill rather than the complexity of the packages!)

     

    Any comments on this concept are welcomed, positive as well as negative!

     

    Cheers all

     

    Owen Mc

  9. Hey all,

     

    I've incorporated Leo's suggestion of including links on the changelog using the following:

    sed "s/ $keyword / <a href=$link>$keyword<\/a>/g"

     

    This only applies to the current changelog on display, not those archived for previous weeks.

     

    Hope this impresses someone out there :P

     

    Cheers

     

    Owen Mc

  10. Hit counter added (to suppliment visitor counter). uses grep to count occurances of "GET / HTTP/1.1" in the apache log file (which occurs once per load of the homepage). It also filters out local hits (ie from 127.0.0.1) so as not to count those (using grep -v).

  11. Hey Leo

     

    I've added the links back to "Home", simple formatting at the moment, but I'l work on that once I have a site together.

     

    As for links in the changelog, I like the idea. I think I'll do something allong the lines of creating a file full of keywords and their corresponding links, then some how search the document(grep?) and replace those keywords with links.

     

    After today I'll be away for a few days so there wont be many changes (and a few "No Entries" in the changelog).

     

    Thanks for the ideas,

     

    Owen Mc

  12. I apologise for posting in the wrong place :unsure:

     

    Well, it's the middle of the night and I've just finished adding a guest book. I had to use a little bit of perl (admitted I know next to nothing about perl so I borrowed a script and modified it for my needs) as well as another shell script.

     

    Data (name, email, url, message and ip) from a form is saved to a temporary folder where it is formatted by a script. Formatting includes removal of various characters (to prevent posting html) as well as changing the email address from name@somewhere.com to name at somewhere dot com. Messages are placed within a table (to wrap text) and a line break is added to each line to allow carriage returns. Once everything is added to html a log entry is made and the temporary files are deleted.

     

    I know I still need to work on formatting, but other than that i've kind of run out of ideas. Any suggestions from anyone as to what I might include?

     

    Cheers,

     

    Owen Mc

  13. Since there appears to be a little bit of interest in this I'll post the odd update here when I change things, todays changes include:

     

    -XMMS page now works (i think), will work on formatting next

    -IP Counter on frontpage works (discovered that the script has to be run as root, hence why it was stuck on 9 for a while)

    -Uptime counter changed from using the "uptime" command to using a formatted version of /proc/uptime

     

     

    if I make anymore changes today then I'll just edit this post

     

    Cheers

     

    Owen Mc

  14. Qchem: I have looked into CSS but at the moment I'm just trying to test my idea, getting basic pages put together, then I'll think about styling.

     

    Leo: The XMMS page is pretty buggy at the moment, should contain links to previous days lists but they dont seem to want to appear, I'm working on that though. Formatting will follow once the thing works.

     

    Cheers for the replies,

     

    Owen Mc

  15. Hey all,

     

    I'm rather confused at the moment, I was happily using my computer just now, when i happened to close firefox (on my "Internet" desktop) only to be greeted with a desktop which looks rather like gnome. Infact it also behaves rather like gnome. The thing is, I'm using KDE, with 6 virtual desktops. 5 of which are fine, but "Internet" my 2nd desktop has gone weird. The taskbar is still KDE, and my superkaramba menubar is still present at the top (although not quite transparent anymore), desktop background has changed to the blue "Limited Edition 2005" one (which i believe is the same as the default gnome background).

     

    Can anyone explain what has happened here or have I just gone nuts?

     

    Thanks in advance if anyone can explain this :screwy:

     

    Owen Mc

     

    PS. I've attatched a screenshot to show you what I see

     

    PPS. after restarting the session its still there, If i can get rid of it then i'll post another screenshot of what it should look like

    post-10011-1125792017_thumb.jpg

  16. Hey everyone,

     

    I've got a month left until I go back to university and i've exhausted all of my holiday resources (so i'm now tired, sunburnt and poor). So for the remainder of the holiday I intend to sit here. Now obviously I'm sitting infront of a linux machine, so the possibilities are endless, and i've decided to make and host my own website. Now I've tried this in the past (admittedly using Windows with MS IIS, and making websites with Frontpage or Dreamweaver), and all has gone fine but the sites have died out of lack of maintenence. So I've come up with a new approach, rather than just make a load of pages about me, my interests and general stuff that no one else cares about, I'll base my site on linux, literally.

     

    Heres the plan. Rather than doing a load of fancy graphical design to make it look pretty but not very functional, and then filling it with java, flash, and god knows what else to make it work, I'm going to write a load of shell scripts to make/update the pages for me. Now I'm sure most of you would find this pretty simple, but I have next to no experience with shell scripts (all my knowledge of 'Programming' comes from Matlab at Uni) and even less experience with html.

     

    So far I have a script which automatically places thumbnails on a page and links to the fullsize picture, one that keeps track of what I listen to on xmms, and one to combine my "linux diary" (which is basically a changelog, listing what I do to my computer). As well as this I have a very crude counter on my frontpage (counts the number of different IP addresses in the server log), as well as a display of server uptime.

     

    Now I'm sure there are far more effective ways of doing this, but this is the method I have chosen and will stick to because if nothing else I'll learn how to write scripts, and might even pick up some html. I'm interested to see if anyone has done similar to this, I'm kind of hoping I'm the first, but I doubt it.

     

    Anyone who wants to see (or laugh at) my progress should check out http://omcaree.myftp.org

    If there is enough (any) interest then I'll post regular updates here

     

    Thank you for your time B)

     

    Owen Mc

  17. A strange twist has occured. I installed various camera related things (kde-graphics and kamera) and now typing "camera://" into konqueror brings up a folder called "USB PTP Class Camera" and clicking on this takes me to the camera (pretty much as seen using gphoto2 at the terminal). However, browsing this is incredibly slow and more often than not I reviece "Could not read file /store_00010001" errors. gphoto2 then refuses to work (after recieving errors in konqueror) and i have to reset the camera and try again.

     

    All still works fine using gphoto2 (flphoto, digikam etc..) but konqeuror tries and fails. Any ideas? or should I just stick with gphoto2?

     

    Thanks again

     

    Owen Mc

  18. Thanks for the link, as of yet I cant get it to work (problems during the final "make") but i'll work on it. However, I understand this only gives read-only access to the camera. using windows I can get read/write access, so this must be possible somehow? and it is ideally what I am looking for.

     

    if mounting PTP isn't possible then so be it, I'll live without it. but if anyone out there knows how to mount it with read/write permissions then your help would be much appreciated.

     

    Thanks for the posts so far

     

    Owen Mc

×
×
  • Create New...