Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 52

Thread: Masquarade

  1. #11
    Bogler
    Guest

    Re:Masquarade

    JimH

    Are there any iptable firewall scripts available anywhere for protecting a small network that could be run in conjunction with the masqing script above?

    Any on the RedHat site

    Thanks

    Bogler

  2. #12

    Re:Masquarade

    OK getting somewhere but still a few probs.

    I worked out how to scrap the GUI and connect manually with wvdial. Then connected to internet. The problem was with your script (or the way i used it maybe?).

    i copied every line from
    #!/bin/bash
    to
    #end

    into a file called /bin/masq.

    chmod 700 /bin/masq - everything cool so far i think. 8)

    When i typed masq it said command not found or something.
    So i deleted the first line - #!/bin/bash - and it ran but came up with two unrecognised commands and a unexpected end at line 64 i think. ??? Im no programmer so damn i was confused.

    I checked /bin/ and sure enough there was bash.

    Is it something im doing? Also when reading about ipchains MASQ was used instead of MASQUERADE. could that be the problem with the unexpected end at line 64 or whatever number it was ? Hmmmm detective work to be done methinks.

    Anyway i did an /sbin/route -n for ya Jim:

    [root@Satan root]# /sbin/route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.130.5 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
    0.0.0.0 192.168.130.5 0.0.0.0 UG 0 0 0 ppp0


    is it promising? :-\

    Anyway Cheers! friskydrifter ;D
    Its better to regret something you have done than to regret something you havent done :P

  3. #13
    JimH
    Guest

    Re:Masquarade

    This is the line screwing you up probably. It is one line, not two.

    iptables -t nat -A POSTROUTING -o $EXTERNAL_DEV -s $INTERNAL_NET
    -j MASQUERADE

    The backslash that means "continued on next line" was removed from my post before.

    Jim H

  4. #14

    Re:Masquarade

    OK
    I can't seem to get the script running (ill work on it a bit more later) but i think im beginning to understanding the jist of it so just to see if the machine would do the job i attempted to type the commands in by hand.

    This is the outcome:

    [root@Satan root]# ifup ppp0
    [root@Satan root]# echo "1" > /proc/sys/net/ipv4/ip_dynaddr
    [root@Satan root]# iptables -t nat -F
    [root@Satan root]# iptables -t nat -X
    [root@Satan root]# iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/16 -j
    MASQUERADE

    [root@Satan root]# route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    203.134.19.33 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
    0.0.0.0 203.134.19.33 0.0.0.0 UG 0 0 0 ppp0

    Then i pinged GLO from the linux box (because no GUI)and that worked. Then tried to access the net with one of the windows machines but it didn't happen.
    Also i started httpd and could see the test page from the windows machine (dont know if that helps at all)

    So im guessing its either my commands, the windows configuration or a routing problem?

    Waddaya reckon?
    T
    Its better to regret something you have done than to regret something you havent done :P

  5. #15
    JimH
    Guest

    Re:Masquarade

    Do you have the default gateway on the windows boxes set to the linux box?

    Did you setup your ISP's DNS servers on the windows boxes?

    What exactly is the error message displayed on the windows boxes?

    Jim H

  6. #16

    Re:Masquarade

    Do you have the default gateway on the windows boxes set to the linux box?
    Yep
    Did you setup your ISP's DNS servers on the windows boxes?
    Not that im aware of? How where do i do that? Plus I don't know there DNS servers. Am i going to have to ring them/I hate dealing with ISP's.
    What exactly is the error message displayed on the windows boxes?
    Page Cannot be found.

    Thanks for your time Jim
    Its better to regret something you have done than to regret something you havent done :P

  7. #17
    JimH
    Guest

    Re:Masquarade

    Quote Originally Posted by friskydrifter
    Did you setup your ISP's DNS servers on the windows boxes?
    Not that im aware of? How where do i do that? Plus I don't know there DNS servers. Am i going to have to ring them/I hate dealing with ISP's.
    Will not work for sure if you have not configured DNS on the windows boxes.

    You can find out you ISP's DNS servers by looking in /etc/resolv.conf on your linux box after you connect to the internet.

    How and where you set them up on the windoze boxes depends on the version of windoze you are running.

    Jim H

  8. #18

    Re:Masquarade

    ;D ;D ;D heh heh heh i love this
    Here i am using my windie machine sitting behing my linux box while it merrily masquerades away while sharing files too.

    Linux is great! its running on a Pentium 100 Mhz with 48 MB RAM (WOAH!). And its only got 2 ISA 10mbps NIC's but still manages to do exactly what i want it to.
    And I had so much fun too!

    Thank you so much Jim
    Three cheers for This site in generall
    Think im gonna shed a tear lol

    The DNS servers on the doze boxes was the trick.

    Its better to regret something you have done than to regret something you havent done :P

  9. #19
    Bogler
    Guest

    Re:Masquarade

    I have been trying to get the MonMotha iptables firewall script going.

    I followed the instructions (earlier in the thread) about disabling ipchains. I have edited the MonMotha script to reflect my environment and made it executable. The script is meant to be run from /etc/rc.d as rc.firewall (if i remember correctly).

    Anyway, my question is how to start iptables on boot in order to run the above script.

    Also, wee bit off track, the rc.local file can be used to run processes at boot. I would like to start my sound drivers at boot.. i spose i could enter the path to them in rc.local? What sort of stuff do people have in rc.local.

    Also where are the scripts in /etc/rc.d/init.d called from? I would like to start smb etc at boot.

    I'm trying to understand the boot process better. I have the RH manuals.

    Thanks

    Bogler :P 8)

  10. #20
    JimH
    Guest

    Re:Masquarade

    Quote Originally Posted by Bogler
    Anyway, my question is how to start iptables on boot in order to run the above script.
    ??? The script you have doesn't support masquerading?

    Also, wee bit off track, the rc.local file can be used to run processes at boot. I would like to start my sound drivers at boot.. i spose i could enter the path to them in rc.local? What sort of stuff do people have in rc.local.
    ??? What sound drivers are you running? If the correct entries are in /etc/modules.conf they should load on boot.

    I would like to start smb etc at boot.
    chkconfig --level 35 smb on

    Jim H

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •