Betriebssysteme > Solaris/x86 und OpenSolaris

Solaris 10 als Router und Probleme mit NAT

(1/3) > >>

Manu64:
Hallo,

mein Name ist Manu und bin neu im Forum.
Ich habe irgendwann mit Solaris aufgehoert und bin
Auf Debian umgestiegen. Nun seit solaris 10 fuer X86
Hat mich wieder das Fieber gepackt und schon tauch das erste Problem auf.

Ich habe Solaris 10 als Router konfiguriert, die automatisch unter sppp0 vom ISP den Deafultrouter und die IP bezieht.
Zusaetzlich hat die gleich Netzwerkkarte die IP 192.168.10.10, die als Router fuer`s LAN dienen sollte und das Problem liegt daran, dass die andere Rechner im LAN z.B. 192.168.10.30 zwar den Router anpingen kann (SSH laeuft auch), jedoch die NAT nicht
Funktioniert.

Hier paar Info`s , was ich bisher gemacht habe.

***********************************************************************
Ifconfig –a

lo0:
flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
rtls0:
flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4>
mtu 1500 index 2
        inet 192.168.10.10 netmask ffffff00 broadcast
192.168.10.255
        ether 0:0:b4:bf:19:34
sppp0:
flags=10011008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,ROUTER,IPv4,FIXEDMTU>
mtu 1492 index 3
        inet 85.xx.xx.xx --> 212.xxx.xxx.xxx netmask
ff000000
        ether 0

**************************************************************************
  routeadm
             Konfigurations-  Aktuelle           
Aktueller
                     option   Konfiguration       
Systemstatus

         IPv4-Weiterleitung   aktiviert           
aktiviert
               IPv4-Routing   Standard (aktiviert)
aktiviert

ifconfig rtls0 modlist
0 arp
1 ip
2 pfil
3 rtls


ifconfig sppp0 modlist
0 ip
1 sppp

svcs | egrep pfil
online         21:37:28 svc:/network/pfil:default
online         21:37:40 svc:/system/rmtmpfiles:default


more /etc/ipf/ipf.conf

pass in all
pass out all

more /etc/ipf/ipnat.conf
map sppp0 192.168.10.0/24 -> 0/32

more /etc/ipf/pfil.ap
rtls    -1      0       pfil
sppp    -1      0       pfil

more /etc/ppp/options
plink



Der Zugang zum Internet direkt ueber die Solariskiste funktioniert sehr gut.
Nur die Rechner im LAN koennen nicht geNATet werden, was mir ein Raetsel
Ist.

Vielleicht hat jemand eine Idee…

Vielen Dank
Manu

erisch:
versuch mal folgendes:

#ndd -set /dev/ip ip_forwarding 1


Mfg. Erisch

paraglider242:
Welche Version von IPFilter benutzt du (ipf -V)? Mit der bei Solaris 10 3/05 und 1/06 mitgelieferten v4.0.2 gibts einige Probleme bezüglich NAT (genaueres dazu findest du auf der IPFilter-Mailinglist unter http://marc.theaimsgroup.com/?l=ipfilter)

Manu64:
Guten Morgen,

ip-forwardings ist defaultmaessig aktiviert, wenn der Rechner hoch faehrt.
routeadm
             Konfigurations-  Aktuelle             Aktueller
                     option   Konfiguration        Systemstatus
---------------------------------------------------------------
         IPv4-Weiterleitung   aktiviert            aktiviert
         IPv4-Routing   Standard (aktiviert) aktiviert

Ich benutze die Solaris Version

uname -a
SunOS rechnername 5.10 Generic_118855-14 i86pc i386 i86pc

Die Abfragen ergeben:

svcs | egrep '(pfil|ipfilter)'
online          6:05:03 svc:/network/pfil:default
online          6:05:18 svc:/system/rmtmpfiles:default
online          6:05:18 svc:/network/ipfilter:default

und schliesslich

ipf -V
ipf: IP Filter: v4.0.3 (500)
Kernel: IP Filter: v4.0.3               
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 1

Vielen Dank und Gruss
Manu

escimo:
Hallo Manu64,

hatte IP-Filter bei meinem letzten Server auch im Einsatz - allerdings unter Solaris 8 (x86). Damals musste ich mit dem Sun C-Compiler allerdings das Paket zunächst erstellen. Nach der Installation habe ich mir dann eine kleine DMZ aufgebaut, mit der alle lokalen Rechner über den Server auf meinen Router zugreifen, um schließlich ins Internet zu gelangen.

Zu deiner ipnat.conf - das reicht meines Wissens nicht aus:

--- Zitat ---more /etc/ipf/ipnat.conf
map sppp0 192.168.10.0/24 -> 0/32

--- Ende Zitat ---

Versuch's mal damit:

#/etc/ipf/ipnat.conf
map sppp0 192.168.10.0/24 -> 0/32 proxy port ftp ftp/tcp
map sppp0 192.168.10.0/24 -> 0/32 portmap tcp/udp auto
map sppp0 192.168.10.0/24 -> 0/32

Zumindest die zweite Zeile ist wichtig.  ;)

Meine Konfiguration von damals (zum Vergleich):

# /etc/opt/ipf/ipnat.conf
map elxl1 192.168.28.0/24 -> 192.168.178.249/32 proxy port ftp ftp/tcp
map elxl1 192.168.28.0/24 -> 192.168.178.249/32 portmap tcp/udp auto
map elxl1 192.168.28.0/24 -> 192.168.178.249/32

Der Endpunkt mit der IP-Adresse 192.168.178.249 gehörte zu der zweiten NIC elxl1. Die war mit meinem Router (IP-Adresse 192.168.178.1) verbunden.

Hier mal als Pendant die Ausgaben vom ehemaligen Server:

--- Code: ---# uname -a
SunOS megnis 5.8 Generic_108529-27 i86pc i386 i86pc

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
elxl0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.28.61 netmask ffffff00 broadcast 192.168.28.255
ether 0:50:4:2c:a0:82
elxl1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.178.249 netmask ffffff00 broadcast 192.168.178.255
ether 0:50:4:54:58:4a



# netstat -rn
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.28.0         192.168.28.61         U        1      4  elxl0
192.168.178.0        192.168.178.249       U        1      1  elxl1
224.0.0.0            192.168.28.61         U        1      0  elxl0
default              192.168.178.1         UG       1      0 
127.0.0.1            127.0.0.1             UH      34   4029  lo0



# netstat -i
Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue
lo0   8232 loopback      localhost      4277   0     4277   0     0      0     
elxl0 1500 192.168.28.0  megnis         1615   2270  1613   0     0      0     
elxl1 1500 192.168.178.0 megnise        5      20    94     0     0      0     



# netstat -s -P ip
IPv4 ipForwarding        =     1 ipDefaultTTL        =   255
ipInReceives        =  2000 ipInHdrErrors       =     0
ipInAddrErrors      =     0 ipInCksumErrs       =     0
ipForwDatagrams     =    38 ipForwProhibits     =     0
ipInUnknownProtos   =     4 ipInDiscards        =     0
ipInDelivers        =  6384 ipOutRequests       =  2049
ipOutDiscards       =     0 ipOutNoRoutes       =     0
ipReasmTimeout      =    60 ipReasmReqds        =     0
ipReasmOKs          =     0 ipReasmFails        =     0
ipReasmDuplicates   =     0 ipReasmPartDups     =     0
ipFragOKs           =     0 ipFragFails         =     0
ipFragCreates       =     0 ipRoutingDiscards   =     0
tcpInErrs           =     0 udpNoPorts          =    11
udpInCksumErrs      =     0 udpInOverflows      =     0
rawipInOverflows    =     0 ipsecInSucceeded    =     0
ipsecInFailed       =     0 ipInIPv6            =     0
ipOutIPv6           =     0 ipOutSwitchIPv6     =     1



# ipf -V
ipf: IP Filter: v3.4.35 (432)
Kernel: IP Filter: v3.4.35             
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 1


# ipfstat
dropped packets: in 0 out 0
non-data packets: in 0 out 0
no-data packets: in 0 out 0
non-ip packets: in 0 out 0
   bad packets: in 0 out 0
copied messages: in 0 out 1801
 IPv6 packets: in 0 out 0
 input packets: blocked 0 passed 2398 nomatch 0 counted 0 short 0
output packets: blocked 0 passed 2457 nomatch 0 counted 0 short 0
 input packets logged: blocked 0 passed 0
output packets logged: blocked 0 passed 0
 packets logged: input 0 output 0
 log failures: input 0 output 0
fragment state(in): kept 0 lost 0 not fragmented 0
fragment state(out): kept 0 lost 0 not fragmented 0
packet state(in): kept 0 lost 0
packet state(out): kept 0 lost 0
ICMP replies: 0 TCP RSTs sent: 0
Invalid source(in): 0
Result cache hits(in): 1754 (out): 1409
IN Pullups succeeded: 2397 failed: 0
OUT Pullups succeeded: 0 failed: 0
Fastroute successes: 0 failures: 0
TCP cksum fails(in): 0 (out): 0
Packet log flags set: (0)
none



# ipfstat -io
pass out from any to any
pass in from any to any

--- Ende Code ---


Viele Grüße
escimo

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln