Vous n’êtes pas connecté.
LiquidAcid
Non enregistré
![]() |
Code source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
#!/bin/sh #------------------------------------------------------------------------------ # /etc/portfw.sh - ip port forwarding #------------------------------------------------------------------------------ # ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION # NEW ARGUMENTS, SEE BELOW !!! # ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION #------------------------------------------------------------------------------ # Called by /etc/ppp/ip-up everytime a new connection will be established # # Either ipportfw or ipautofw can be used #------------------------------------------------------------------------------ # Usage of portfw (NEW): # # add entry: # ipmasqadm portfw -a -P PROTO -L LADDR LPORT -R HIDDENHOST RPORT [-p PREF] # delete entry: # ipmasqadm portfw -d -P PROTO -L LADDR LPORT [-R HIDDENHOST RPORT] # clear table: # ipmasqadm portfw -f # list table: # ipmasqadm portfw -l # no names: # ipmasqadm portfw <args> -n # # PROTO protocol, can be "tcp" or "udp" # LADDR local interface receiving packets to be forwarded # LPORT port being redirected # HIDDENHOST ip address of your lan computer using the application # RPORT the port being redirected to # PREF preference level (load balancing, default=10) #------------------------------------------------------------------------------ # Usage of autofw (NEW): # # add entry: # ipmasqadm autofw -A -r PROTO LOW HIGH [-h HIDDENHOST] [-c ctltype ctlport] # clear table (flush): # ipmasqadm autofw -F # # PROTO protocol, can be "tcp" or "udp" # LOW lowest port of range # HIGH highest port of range # HIDDENHOST ip address of your lan computer using the application #------------------------------------------------------------------------------ # Here you will find hints to get your application run: # # [url]http://www.tsmservices.com/masq/[/url] #------------------------------------------------------------------------------ # Creation: 08.09.2000 fm # Last Update: 07.09.2001 tg #------------------------------------------------------------------------------ # You can access the IP of the ppp device with $ip #------------------------------------------------------------------------------ # Define your PCs to forward ports to: #------------------------------------------------------------------------------ hiddenhost1=192.168.0.2 # ip of PC 'voodoomaster' in LAN hiddenhost2=192.168.1.2 # ip of PC 'terminator' in LAN #hiddenhost3=192.168.0.4 # ip of PC in LAN: change here! #hiddenhost4=192.168.0.5 # ip of PC in LAN: change here! #------------------------------------------------------------------------------ # example for ftp (internal ftp server, access from outside): # # Don't forget to correct the firewall ports in base.txt, see FW_N_PORTS # and FW_PORT_x # # and to enable the ftp-Masquerading module in config.txt: # MASQ_MODULE_1='ftp' # masquerading module: ftp #------------------------------------------------------------------------------ #/usr/sbin/ipmasqadm autofw -A -v -r tcp 21 21 -h $hiddenhost1 #------------------------------------------------------------------------------ # example for Battlecom (using ipautofw): #------------------------------------------------------------------------------ #/usr/sbin/ipmasqadm autofw -A -v -r udp 2300 2400 -h $hiddenhost1 #/usr/sbin/ipmasqadm autofw -A -v -r tcp 2300 2400 -h $hiddenhost1 #/usr/sbin/ipmasqadm autofw -A -v -r tcp 47624 47624 -h $hiddenhost1 #/usr/sbin/ipmasqadm autofw -A -v -r udp 47624 47624 -h $hiddenhost1 #/usr/sbin/ipmasqadm autofw -A -v -r udp 28800 28900 -h $hiddenhost1 # --- added from config.txt --- |
-