Franck Mereo (zekiller28) Admin
Nombre de messages : 3039 Age : 50 Localisation : Paris Date d'inscription : 09/10/2006
| Sujet: XServe en tant que routeur Mar 15 Jan - 1:47 | |
| Hello ! je voudrais que mon XServe (auquel j'ai branché sur l'Ethernet 2 ma freebox) me serve de routeur et donc re-route les requêtes selon leur port vers la bonne machine (exemple : requête sur le port 80 -> 10.0.1.2) sachant que mon XServe est branché à mon switch via l'Ethernet 1. Je pensais trouver mon bonheur dans "NAT" mais pas du tout. Quelqu'un a-t-il déjà testé celà ? | |
|
Franck Mereo (zekiller28) Admin
Nombre de messages : 3039 Age : 50 Localisation : Paris Date d'inscription : 09/10/2006
| Sujet: Re: XServe en tant que routeur Mar 15 Jan - 14:16 | |
| je me réponds à moi-même pour ceux que ça intéresse : Il faut mettre les mains dans le camboui, je vous préviens : - Code:
-
To forward port traffic: 1 If the file /etc/natd.plist doesn’t exist, make a copy of the default NAT daemon plist. sudo cp /etc/nat/natd.plist.default /etc/natd.plist 2 Using a Terminal editor, add a new block of XML text to /etc/natd.plist before the two last lines which end the file (</dict> and </plist>) Add this block, and substitute your desired settings where indicated by italics: <key>redirect_port</key> <array> <dict> <key>proto</key> <string>TCP or UDP</string> <key>targetIP</key> <string>LAN_ip</string> <key>targetPortRange</key> <string>LAN_ip_range</string> <key>aliasIP</key> <string>WAN_ip</string> <key>aliasPortRange</key> <string>WAN_port_range</string> </dict> </array> 3 Save your file changes. The changes made, except for those settings that Server Admin can change and comments, will be respected by the server configuration tools (Server Admin, Gateway Setup Assistant and serveradmin). 4 Configure NAT service in Server Admin, as desired. See “Configuring NAT Service” on page 89 for more information. 5 Click Save. Port Forwarding Examples You can forward a single port or any number of ports to a given IP address. The ports on the WAN side do not have to match the ports on the LAN side, but must correspond. For example, if you forward 10 consecutive ports from the WAN side, you must forward them to 10 consecutive ports on the LAN side, but they don’t need to be the same 10.
Single Port Forwarding This example shows the setting to forward TCP port 80 (web service) connections on the WAN address of 17.128.128.128 to TCP port 80 (web service) on the private LAN address of 192.168.1.1. The block of text to add to the /etc/natd.plist file is: <key>redirect_port</key> <array> <dict> <key>proto</key> <string>TCP</string> <key>targetIP</key> <string>192.168.1.1</string> <key>targetPortRange</key> <string>80</string> <key>aliasIP</key> <string>17.128.128.128</string> <key>aliasPortRange</key> <string>80</string> </dict> </array> Multiple Port Forwarding This example shows the setting to forward TCP and UDP ports 600-1023 (NetInfo, full range) connections on the WAN address of 17.128.128.128 to corresponding ports on the private LAN address of 192.168.1.1. The block of text to add to the /etc/natd.plist file is: <key>redirect_port</key> <array> <dict> <key>proto</key> <string>TCP</string> <key>targetIP</key> <string>192.168.1.1</string> <key>targetPortRange</key> <string>600-1023</string> <key>aliasIP</key> <string>17.128.128.128</string> <key>aliasPortRange</key> <string>600-1023</string> </dict> </array> <array> <dict> <key>proto</key> <string>UDP</string> <key>targetIP</key> <string>192.168.1.1</string> <key>targetPortRange</key> <string>600-1023</string> <key>aliasIP</key> <string>17.128.128.128</string> <key>aliasPortRange</key> <string>60-1023</string> </dict> </array> | |
|
Franck Mereo (zekiller28) Admin
Nombre de messages : 3039 Age : 50 Localisation : Paris Date d'inscription : 09/10/2006
| Sujet: Re: XServe en tant que routeur Mar 15 Jan - 16:15 | |
| J'oubliais : il faut impérativement activer le firewall d'OSX… | |
|
Alex_ Admin
Nombre de messages : 442 Localisation : Nantes_Fr Date d'inscription : 13/11/2005
| Sujet: Re: XServe en tant que routeur Mar 15 Jan - 19:55 | |
| Bravo Franck
je n'avais pas eu le temps de chercher…
bonne continuation tu vas finir par devenir… zekiller d'os x server ;-) | |
|
Franck Mereo (zekiller28) Admin
Nombre de messages : 3039 Age : 50 Localisation : Paris Date d'inscription : 09/10/2006
| Sujet: Re: XServe en tant que routeur Mar 15 Jan - 19:57 | |
| Merchi, merchi… ;-)
Venant de toi, c'est un sacré compliment… | |
|
Contenu sponsorisé
| Sujet: Re: XServe en tant que routeur | |
| |
|