IPFILTER NAT Rules

IPFILTER NAT Rules

Post by Robert McIntyr » Wed, 02 Feb 2000 04:00:00



I need help with my NAT rules

I have ipfilter up and supposedly running on a duel NIC ultra 5 Sol7

hme0
    24.219.7.122    255.255.255.192   default  gateway 24.219.7.126
hme1
    192.168.1.1    255.255.255.0

I want to translate from my private LAN (accessible through hme1)  through
my gateway (accessible through hme0)

PRIVATE
LAN--------------------------hme1 --------Ultra5------hme0 -----------------
-Router-----------INTERNET
192.168.1.1 to 192.168.1.255           192.168.1.1
24.219.7.121                24.219.7.126
mask 255.255.255.0                     mask 255.255.255.0    mask
255.255.255.192  mask 255.255.255.192

I have 192.168.1.1 set as gateway for Private LAN machines
I can ping hme1 and hme0 but can not get to the Internet.

Thanks
Robert McIntyre

Robert G. McIntyre
General Partner
Intergrated Business Solutions
214 485 0224 Phone
214 485 0225 Fax

 
 
 

IPFILTER NAT Rules

Post by Toshio Kumaga » Wed, 02 Feb 2000 04:00:00


Hi Robert,

        Do you want to do static NAT or PAT ?
        And your IP filter Darren Reed's ip-fil ?
        If so, here shows a sample.

  1:    NAT rules.
        Create a file (for example, nat.conf) on your NAT
        box.
        dnet0 is external interface on my NAT box.
        hme0 for you.
        bimap dnet0 192.168.1.5/32 ->  210.163.99.5/32
        map dnet0 192.168.1.0/24 -> 210.163.99.6/32 portmap \
                tcp/udp 50000:60000

        First rule translates internal 192.168.1.5 to global
        address space 210.163.99.5 and vv.
        Second rule translates internal 192.168.1.0/24 except
        192.168.1.5 to 210.163.99.6 (one way translation).
        Of course 192.168.1.0/24 can communicate with external
        world if the connection is initiated from internal.

  2:    ARP table.
        Run arp on your NAT box to add arp table in order to
        communicate with external world.
        /usr/sbin/arp -s 210.163.99.5 00:c0:26:ff:01:e5 pub
        /usr/sbin/arp -s 210.163.99.6 00:c0:26:ff:01:e5 pub

        The ethernet address is external side MAC address.
        hme0's MAC address should be put here.
        Then, run next command.
        /sbin/ipnat -CF -f nat.conf
        No changes are required for your router.

        At this moment, ip-fil 3.3.8 is the lates version but
        3.3.6 is running solid on my NAT/Firewall box with
        Solaris7/x86.

        Hope this helps.


> I need help with my NAT rules

> I have ipfilter up and supposedly running on a duel NIC ultra 5 Sol7

> hme0
>     24.219.7.122    255.255.255.192   default  gateway 24.219.7.126
> hme1
>     192.168.1.1    255.255.255.0

> I want to translate from my private LAN (accessible through hme1)  through
> my gateway (accessible through hme0)

> PRIVATE
> LAN--------------------------hme1 --------Ultra5------hme0 -----------------
> -Router-----------INTERNET
> 192.168.1.1 to 192.168.1.255           192.168.1.1
> 24.219.7.121                24.219.7.126
> mask 255.255.255.0                     mask 255.255.255.0    mask
> 255.255.255.192  mask 255.255.255.192

> I have 192.168.1.1 set as gateway for Private LAN machines
> I can ping hme1 and hme0 but can not get to the Internet.

> Thanks
> Robert McIntyre

> Robert G. McIntyre
> General Partner
> Intergrated Business Solutions
> 214 485 0224 Phone
> 214 485 0225 Fax


--


 
 
 

1. ipfilter rule set..?

Hello:

I am a newbie to ipfilter and want to use it to control access to
my machine in office (SunBlade running Solaris-8).

I have written the following ruleset for ipfilter (incoming traffic
only) and I want unrestricted traffic from my machine to world. I
need help with this as outgoing traffic is being blocked
(telnet/ftp/smtp etc.)? Any pointers?

-ishwar
--------
#       IPfilter rules for Solaris-8 7/31/01
#  Allow ftp/telnet from mysubnet to host BUT unrestricted
#  access from host to outside world..
#
#  MYIPADR -- hostipaddress
#  MYSUBNET -- subnetipaddress
# local -- lo0
pass in quick on lo0 all

# address spoofing
block in quick on eri0 from 127.0.0.0/8 to any
block in quick on eri0 from MYIPADR to any

# ftp(20/21), ssh(22), telnet(23), smtp(25), http(80)
pass in quick on eri0 proto tcp from MYSUBNET to any port = 20
pass in quick on eri0 proto tcp from MYSUBNET to any port = 21
pass in quick on eri0 proto tcp from any to any port = 22
pass in quick on eri0 proto tcp from MYSUBNET to any port = 23
pass in quick on eri0 proto tcp from any to any port = 25
pass in quick on eri0 proto tcp from any to any port = 80

# dns??
pass in quick on eri0 proto udp from NAMSVR port = 53 to any

# others???
pass in quick on eri0 proto tcp from any to any port = 111
pass in quick on eri0 proto tcp from MYSUBNET port > 1023 to any
pass in quick on eri0 proto udp from MYSUBNET port > 1023 to any

# icmp
pass in quick on eri0 proto icmp from any to any

# deny the rest
block in log quick on eri0 all
---------

2. 6/41 sound/oss/pss.c - convert cli to spinlocks

3. ipfilter why does moving a rule break it?

4. upper -> lowercase filename?

5. ipfilter rule set

6. Sendmail? DNS? Problem please

7. Converting ipchains rules to ipfilter, please!

8. What root can do, su cannot do?

9. ipfiltering rules problem

10. ipfilter rule

11. How to set FTP rule in IPFilter firewall on Solaris 8(x86)??

12. easy one...IPFilter rule to allow email through

13. ipfilter problem - "pass in" rules not active after boot