Witam wszystkich
Przeglądałem posty znajdujące się na tej stronie, ale muszę jeszcze o jedno zapytać, a mianowicie chciałem stać się sctiv na dc, ale nie wiem jak przekierować porty. Mam opis jak to zrobić ale do końca nei łapię i coś psuję
Oto fragment opisu:
8.34 Jak przekierować porty w pliku /mnt/router/etc/forward.cfgNp. jeżeli chcemy przekierować port 80 na komputer w sieci LAN o adresie 198.162.0.4 na jego port 80, to w pliku forward.cfg dla protokołu UDP wpisujemy: u,80,192.168.0.4/80 natomiast
dla protokołu TCP: t,80,192.168.0.4/80
plik ten wygląda tak:
#_47x._[Port_forwarding_AKA_export_services]
#_
#_tcp|udp,incoming_port,local_computer_IP_addr/port
#_
#_Example:_t,80,192.168.168.2/80
#_this_will_open_worldwide_web_server_on_local_computer_192.168.168.2
#_
#_Example:_t,21,192.168.168.3/21
#_this_will_open_worldwide_ftp_server_on_local_computer_192.168.168.2
#_
#_Comment_must_be_on_separate_line_start_with_"#_"_and_should_not_have_spaces
nie wiem w którym miejscu mam wpisywać.
Znalazłem też na tym forum coś takiego:
po prostu wpisujes pod konsola albo dopisujesz do pliku rc_user (lepsze rozwiaznie) taka linijke :
ipautofw -A -r tcp 412 412 -h xxx.xxx.xxx.xxx ---> twoj lokalny ip
412 to tylko przykladowy port rownie dobrze moze byc 413 ,414 itd.
Jak by nie dzialalo to przekieruj tez udp.
A więc otworzyłem ten plik:
#!/bin/sh
#
# User startup/shutdown and firewall script.
. /etc/system.cfg
. /etc/live.cfg
. /etc/chat.pwd
if [ "$1" = firewall ]; then
# Add your custom firewall rules here. Warning, incorrect rules could
# leave your system insecure. $INET always represents the internet
# interface. These rules come before standard system rules. Example:
# reject incomming tcp connections to port 22 from the internet and log
#ipfwadm -I -a reject -P tcp -W $INET -D 0.0.0.0/0 22 -y -o
#----------------------------------------------------------------------
exit; fi
if [ "$1" = stop -o "$1" = restart ]; then
echo -n "Stopping rc_user... "
# Add commands here you want to execute when shutting down or rebooting.
# Be careful not to use any commands which wait for user input.
#----------------------------------------------------------------------
$DONE; [ "$1" = stop ] && exit; fi
echo -n "Starting rc_user... "
# Add commands here you want to execute when booting. Use the fork
# command to launch programs which normally stay in the foreground.
#----------------------------------------------------------------------
$DONE
i też nie wiem w którym miejscu mam to wpisać
Niech ktoś będzie tak miły i mi podpowie w którym miejscu i co mam wpisać, chodzi mi o jakiś konkretny przykład, a dalej już sobie poradzę
Pozdrówka.......