Toon posts:

mapping internet ip portnaar internal lan ip ports

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo,

Weet iemand waar ik kan vinden of lezen hoe ik mijn freebsd 4.0 machine vertel dat inkomende connecties op bepaalde poorten, bijv 21 en 5653 moeten worden gerouteerd naar interne (192.168.*.*) adressen. De reden is dat ik door de firewall wel ftp en pcanywhere verkeer naar binnen toe wil laten, die dan naar specifieke (verschillende) hosts zou moeten gaan op het interne netwerk. En het liefst zou ik dan ook weten hoe je bepaalde subnetten wel of geen toegang wil geven. Maw, op mijn werk heb ik verschilllende comps, en ze moeten allemaal toegang hebben omdat ze uit 1 range komen) Ik heb de freebsd manual gekocht, RTFM, maar welke page ? De machine is al zo geconfigureeerd dat hij dienst doet als DHCP server voor een windhoos netwerkje, hij firewallt, en geeft internet toegang aan alle windhoosbakken dmv ipmasq.. Wat ik nodig heb is een sample config file+uitleg hoe ik een soort reverse-ip masqing doe..

Some serious help needed here.. :-0

Groeten,

Mike

Verwijderd

(zie ook andere post hierover).

ik heb deze vraag zelf ook gesteld op een Freebsd forum (zie hieronder):

Hi,

I recently installed freebsd at home to use it as a gateway for my internal network. When my firewall is setup up as "open", I have no problems playing Unreal tournament, but most of the other games just
won't start a multiplayer session. When I set my firewall to "simple", none of the games comes through. I already figured out this had something to do with the ports on which the game server replies and I
know that there are scripts like ip_masq_quakeII for linux, but I am wondering whether there were scripts like that for freebsd.

are those scripts hard to write for yourself? I hope not, because I play a lot of games and to write a new script for al of my games would be very time-consuming ;o), Or is it possible to add a rule to the
firewall like ipfw add divert tcp from x{port} to y{internal adres of computer} ?????

Please help me out, give me examples!

thanx.

antwoord was:


You should try the *BSD type masq-type-solution, NATD.

Here's a shortlist of what you'd need to do to use it:

+ Recompile your kernel with the option IPDIVERT
+ Add the following to your /etc/rc.conf
gateway_enable="YES"
firewall_enable="YES"
firewall_type="SIMPLE"
natd_enable="YES"
natd_interface=""
natd_flags="-f /etc/rc.natd"
+ Add a few basic things to your /etc/rc.natd file:
echo -e "same_ports
use_sockets
unregistered_only
dynamic" >
/etc/rc.natd
+ Reboot and enjoy!


Dit werkte overigens niet, waarschijnlijk door verkeerd gebruik van "" e.d. wie o wie heeft hier een oplossing voor?????