Results 1 to 7 of 7

Thread: Gateway PET?

Hybrid View

  1. #1

    Gateway PET?

    My situation is i have college in 6 weeks. in these dorms you get 2 ethernet ports, 1 for your roomate and 1 for you. i will have my linux and win2k box's with me using a KVM to save room. now, i know that i plug my linux box into that 1 ethernet port. and then i used a 2nd nic to plug it into my hub that ill bring with. then add in the win2k box on the next port of the hub. i have never gateway'd before and it would be of some help, if anyone could point me in the direction of learning to get both of these on the colleges T1 lan, as well as have linux as my gateway. if i could get this to work i would have a very sweet setup. any help is appreciated.

  2. #2

    Re:Gateway PET?

    I'm not that linux guru, but for a simple masquerading setup this should do fine:

    Code:
    # Load the NAT module (this pulls in all the others).
    modprobe iptable_nat
    
    # In the NAT table (-t nat), Append a rule (-A) after routing
    # (POSTROUTING) for all packets going out ppp0 (-o ppp0) which says to
    # MASQUERADE the connection (-j MASQUERADE).
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    
    # Turn on IP forwarding
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Replace ppp0 with the external interface on your gateway box.
    If you want to finetune this or add firewall functionality to it take a look at this HOW-TOs:

    http://netfilter.samba.org/documenta...NAT-HOWTO.html
    http://netfilter.samba.org/documenta...ing-HOWTO.html

  3. #3

    Re:Gateway PET?

    hello,
    i think this is the PET you want.
    http://www.linuxjunior.org/cgi-bin/p...splay&id=2

  4. #4
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Gateway PET?

    Well use the uplink port to plug the hub into a RJ45 jack. They are just going to a wiring closet anyhow (more than likely)

  5. #5

    Re:Gateway PET?

    erm, im not sure about using uplink because they are asking for my NIC's Network Address so i can be added to the network, for security reasons for monitoring blah, so ya, this kinda puts things into perspective, will them adding my network address's affect making gateway any differently?

  6. #6
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:Gateway PET?

    No, the MASQ rule displayed by black666, will make sure any package sent out on teh net seems to orriginate from the MAC address of your gateway.

  7. #7
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Gateway PET?

    [quote author=BurntAsh link=board=23;threadid=4199;start=0#42234 date=1027235616]
    erm, im not sure about using uplink because they are asking for my NIC's Network Address so i can be added to the network, for security reasons for monitoring blah, so ya, this kinda puts things into perspective, will them adding my network address's affect making gateway any differently?
    [/quote]

    Usually a gateway will have a WAN and a LAN NIC. Just make sure that the NIC's MAC you tell them ends up being the WAN adapter. You should be cool then.

Similar Threads

  1. Help about multi gateway
    By mananya in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 03-02-2010, 04:23 PM
  2. setting up a Gateway
    By bdutta in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 08-05-2008, 03:44 AM
  3. Suse 10.2 as gateway
    By mahendraparanjpe in forum Suse
    Replies: 1
    Last Post: 03-04-2007, 02:37 PM
  4. How to set up VPN Gateway in LINUX
    By soumen74 in forum Linux - General Topics
    Replies: 4
    Last Post: 01-03-2005, 09:41 AM
  5. OpenBSD gateway
    By Mor_gath in forum BSD
    Replies: 10
    Last Post: 08-20-2002, 09:49 PM

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
  •