Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
OpenBSD gateway
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: OpenBSD gateway

  1. #1

    OpenBSD gateway

    I have some problems with setting up my gateway it won't pass through my clients, I have ip forwarding enabled, and in my nat.conf I have this:
    Code:
    ext="dc0"
    nat on $ext from 192.168.1.1/24 to any -> $ext
    I have also tried this though it shouldn't differ
    Code:
    nat on dc0 from 192.168.1.1/24 to any -> dc0
    my pf.conf looks like this:
    Code:
    pass in all
    pass out all
    dc0 is connected to the internet and gets an ip from a dhcp server from my isp, I have tried pinging trying to get on to webpages nothing works it won't let me through for some odd reason.
    dc1 is the card for internal network, it is init. by hostname.dc1
    Code:
    inet 192.168.1.1. 255.255.255.0 NONE
    any help would be apprecieted
    I am running openbsd 3.1

  2. #2

    Re:OpenBSD gateway

    See http://www.linuxjunior.org/yabbse/in...;threadid=1837 ... that might lend a helping hand.

  3. #3

    Re:OpenBSD gateway

    no help in that thread to my present problem since all I want is to get my gateway to let my windows box talk to the rest of the world.
    But thnx anyway

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

    Re:OpenBSD gateway

    I see you have a trailing dot in your IP. Check to see if your Ip is good. Plus -- is your gateway on your gateway (try saying that five times ) set correctly?

    Can you ping your lan?

    Haver you checked that the cables are plugged into the proper card?

    This is all crap that I had to fix too. Some my fault, some just dealing with what device was what (3 NICs + 1 more I just added).

    Code:
    $ cat /etc/mygate
    192.168.1.1
    Code:
    $ cat /etc/resolv.conf
    search amerivoice.com
    nameserver 206.141.239.126
    nameserver 206.141.251.2
    nameserver 209.253.113.10
    nameserver 209.253.113.18
    lookup file bind
    Code:
    MCLEOD="xl0"
    nat on $MCLEOD from 206.190.6.0/24 to any -> $MCLEOD
    I cant think of any more right now. But the goal is first to setup each nic to talk to the subnet it is on. For example, I got 4 NICS in mine
    1)LAN
    2)DSL1
    3)DSL2
    4)Mail

    Before worrying about configuring each service -- I had to ensure that each adapter is talking correctly. Trust me -- with 3 to start with -- things got real funky trying to keep each nic straight with where it was going. But a little patience and methodology it worked fine.

  5. #5

    Re:OpenBSD gateway

    Did you load the nat rules and enable pf?

  6. #6

    Re:OpenBSD gateway

    [quote author=GnuVince link=board=10;threadid=4126;start=0#41002 date=1026426109]
    Did you load the nat rules and enable pf?
    [/quote]

    yes,
    still no go

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

    Re:OpenBSD gateway

    So if I read your data correctly, you are esssentially having an issue with your NIC, right? Post your /etc/hostname.dc0 (I think thats the one you werent able to ping thru on) and the results of a

    ifconfig -a

    and a

    ping -I {thats a capital 'eye' and insert dc0's IP address here} google.com

    that ping will ensure that we are pinging from THAT card, not another. Sounds stupid, but can help troubleshoot. May have a goofy routing entry that doesn't forward data correctly. Technically an ping should try the default subnet's adapter, and then goto the default gateway, and then the remaining local adapaters.

  8. #8

    Re:OpenBSD gateway

    hostname.dc0
    Code:
    dhcp NONE NONE NONE
    ifconfig -a
    Code:
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
      inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
      inet6 ::1 prefixlen 128
      inet 127.0.0.1 netmask 0xff000000
    lo1: flags=8008<LOOPBACK,MULTICAST> mtu 33224
    dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
      media: Ethernet autoselect (100baseTX full-duplex)
      status: active
      inet6 fe80::208:a1ff:fe24:fce0%dc0 prefixlen 64 scopeid 0x1
      inet 213.112.91.215 netmask 0xffffff80 broadcast 213.112.91.255
    dc1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
      media: Ethernet autoselect (100baseTX full-duplex)
      status: active
      inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
      inet6 fe80::208:a1ff:fe25:1e5d%dc1 prefixlen 64 scopeid 0x2
    pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
    sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
    sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
    ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
    ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
    tun0: flags=10<POINTOPOINT> mtu 3000
    tun1: flags=10<POINTOPOINT> mtu 3000
    enc0: flags=0<> mtu 1536
    bridge0: flags=0<> mtu 1500
    bridge1: flags=0<> mtu 1500
    vlan0: flags=0<> mtu 1500
    vlan1: flags=0<> mtu 1500
    gre0: flags=8010<POINTOPOINT,MULTICAST> mtu 1450
    gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    ping -l dc0_ip google.com
    Code:
    PING google.com (216.239.35.100): 56 data bytes
    64 bytes from 216.239.35.100: icmp_seq=1 ttl=46 time=170.904 ms
    64 bytes from 216.239.35.100: icmp_seq=3 ttl=46 time=171.133 ms
    64 bytes from 216.239.35.100: icmp_seq=0 ttl=46 time=171.664 ms
    ...
    --- google.com ping statistics ---
    216 packets transmitted, 72 packets received, 66% packet loss
    round-trip min/avg/max/std-dev = 170.904/179.426/189.504/7.416 ms


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

    Re:OpenBSD gateway

    Great we can talk out. Now can we talk on the LAN? Try a ping -I dc1_ip another box on the LAN.

    If we can talk, there we can move on to checking the nat rules more closely. I would suggest flushing all pf rules and sticking only with a basic nat entry in nat.conf:
    Code:
    pfctl -F rules
    pfclt -F nat
    pfctl -N nat.conf
    Code:
    WAN="dc0"
    nat on $WAN from 192.168.1.0/24 to any -> $WAN
    One other thing -- are you positive that the NIC and cable are good? If you setup the LAN side card as a WAN adapter (rename th hostname.dc0 to dc1 and the dc1 to dc0) do you still only get WAN access, or are you now limited to just LAN? I had my share of faulty NICs and ethernet patch cable. You may also have a faulty port on the hub. It is all things I would take into consideration. First off, being the card, then cable, then hub port. If you are using a patch bay, check to see if you punched the cable in well enough. I had a few cables fail, only because the punchdown was loose.

  10. #10

    Re:OpenBSD gateway

    well switched dc0/dc1 so now the gateway works dc1 is now connected to the internet.
    a big thnx to those who helped me

Similar Threads

  1. OpenBSD firewall/gateway
    By peter in forum Tutorials
    Replies: 2
    Last Post: 11-24-2008, 04:08 AM
  2. 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
  3. Gateway before router
    By Lunke in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 06-11-2004, 10:39 AM
  4. Gateway PET?
    By BurntAsh in forum Linux - General Topics
    Replies: 6
    Last Post: 07-24-2002, 04:16 PM
  5. OpenBSD Gateway Installation Guide
    By Schotty in forum Linux - General Topics
    Replies: 2
    Last Post: 06-20-2002, 03:08 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
  •