Sponsored Content
Operating Systems Solaris Port/IP Forwarding in Solaris 10.0 Post 302361685 by vikas027 on Tuesday 13th of October 2009 11:15:11 PM
Old 10-14-2009
Lightbulb

To accomplish my task, I have done this on 10.2.45.100:

In /etc/ipf/ipf.conf
Code:
pass in quick log proto udp from 75.126.76.41 port = 30118 to 10.2.45.197 port = 30118
pass in quick log proto udp from 75.126.76.41 port = 30119 to 10.2.45.197 port = 30119
pass in quick log proto udp from 75.126.76.41 port = 30120 to 10.2.45.197 port = 30120
pass in quick log proto udp from 75.126.76.41 port = 30121 to 10.2.45.197 port = 30121

In /etc/ipf/ipnat.conf
Code:
rdr bge1:1 75.126.76.41/8 port 30118 -> 10.2.45.197 port 30118 udp
rdr bge1:1 75.126.76.41/8 port 30119 -> 10.2.45.197 port 30119 udp
rdr bge1:1 75.126.76.41/8 port 30120 -> 10.2.45.197 port 30120 udp
rdr bge1:1 75.126.76.41/8 port 30121 -> 10.2.45.197 port 30121 udp

This is my ipfstat -io output.

Am I going the right way ? To apply changes in ipnat.conf, do we need a reboot.

Pls suggest a way forward.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

iptables: forwarding a port

I've been googling for a while now, trying to forward port 3000 to port 80.... In the past I used to DLink router to forward port 3000 to 80. I recently finished (well, is it ever done anyhow?) setting up my linux box and got it acting as a router. I want to continue to run Apache on port 80... (1 Reply)
Discussion started by: meeps
1 Replies

2. UNIX for Advanced & Expert Users

port forwarding

Hi, I have to install an application that has a built in tftp server. Tftp comes in on port 69. As i am not installing this application as a root user i am running into trouble because only the root user can listen to ports < 1024. So changing the port i listen to to one greater than 1023 isn't... (1 Reply)
Discussion started by: imloaded24_7
1 Replies

3. AIX

Port/ IP Forwarding AIX5.3

Hi friends i have the following setup machine1 two network adapters one connected to lan the other connected directly to machine2 machine2 is not connected to lan i need to access machine2 directly from the LAN how to force machine1 to forward all traffic received on a specific port the... (1 Reply)
Discussion started by: Husam
1 Replies

4. UNIX for Advanced & Expert Users

Port forwarding

Hi I want to set up port forwarding from one network to another network. I already have this configured on the Linux box using iptables. iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 1521 -j DNAT --to 10.218.146.230 iptables -A FORWARD -p tcp -i eth1 -d 10.218.146.230 -j ACCEPT ... (2 Replies)
Discussion started by: slash_blog
2 Replies

5. Solaris

ip and port forwarding in Solaris 10

Hi; I have the following issue: I have a Solaris server running an old applications which connects to an http server in other server at certain port. The thing is that the http server has changed its ip and port and the addres in the app is hard coded and touching the app by now is out of the... (0 Replies)
Discussion started by: ppereira
0 Replies

6. IP Networking

SSH Port Forwarding - sharing the same port

Hi Linux/Unix Guru, I am setting Linux Hopping Station to another different servers. My current config to connect to another servers is using different port to connect. e.g ssh -D 1080 -p 22 username@server1.com ssh -D 1081 -p 22 username@server2.com Now what I would like to have... (3 Replies)
Discussion started by: regmaster
3 Replies

7. UNIX for Advanced & Expert Users

Iptable and port forwarding

Hello, I have a routeur linksys (192.168.1.1 ) a firewall (192.168.1.55 IN ----> 192.168.2.254 OUT) which using iptable I want to acces to an equipment (lorex video camera serveur 192.168.2.44) which using an ddns service on the port 9000 So i don t know which redirection a will do on the... (2 Replies)
Discussion started by: tapharule
2 Replies

8. UNIX for Advanced & Expert Users

Help on port forwarding please..

Hi experts, We have windows machine ( A ) in one network & 2 Linux Servers ( B & C ) in another network. There is a firewall between these 2 networks and SSH (TCP/22) & HTTPS (TCP/443) are allowed from A to B only (but not to C). There is no personal firewall / iptables running on any machine.... (1 Reply)
Discussion started by: magnus29
1 Replies

9. IP Networking

Port Forwarding not working

Hello Gurus, I have configured port forwarding at router. But after configuration I am not able to connect the computer from outside/Over internet/Remote desktp from other computer. Could you please advice? Thanks- Pokhraj (2 Replies)
Discussion started by: pokhraj_d
2 Replies

10. Red Hat

iptables port forwarding

Hello All, I would like to ask you very kindly with /etc/sysconfig/iptables file I have to setup port forwarding on RHEL6 router. Users from public network must be able to ssh to servers in private network behind RHEL6 router. Problem is that servers in private network must be isolated. My... (2 Replies)
Discussion started by: oidipus
2 Replies
FTP-PROXY(8)						    BSD System Manager's Manual 					      FTP-PROXY(8)

NAME
ftp-proxy -- Internet File Transfer Protocol proxy server SYNOPSIS
ftp-proxy -i [-AnrVw] [-a address] [-D debuglevel] [-g group] [-M maxport] [-m minport] [-R address[:port]] [-S address] [-t timeout] [-u user] ftp-proxy -p [-AnrVw] [-a address] [-D debuglevel] [-g group] [-M maxport] [-m minport] [-R address[:port]] [-S address] [-t timeout] [-u user] DESCRIPTION
ftp-proxy is a proxy for the Internet File Transfer Protocol. The proxy uses pf(4) and expects to have the FTP control connection as described in services(5) redirected to it via a pf(4) rdr command. An example of how to do that is further down in this document. The options are as follows: -A Permit only anonymous FTP connections. The proxy will allow connections to log in to other sites as the user "ftp" or "anonymous" only. Any attempt to log in as another user will be blocked by the proxy. -a address Specify the local IP address to use in bind(2) as the source for connections made by ftp-proxy when connecting to destination FTP servers. This may be necessary if the interface address of your default route is not reachable from the destinations ftp-proxy is attempting connections to, or this address is different from the one connections are being NATed to. In the usual case this means that address should be a publicly visible IP address assigned to one of the interfaces on the machine running ftp-proxy and should be the same address to which you are translating traffic if you are using the -n option. -D debuglevel Specify a debug level, where the proxy emits verbose debug output into syslogd(8) at level LOG_DEBUG. Meaningful values of debu- glevel are 0-3, where 0 is no debug output and 3 is lots of debug output, the default being 0. -g group Specify the named group to drop group privileges to, after doing pf(4) lookups which require root. By default, ftp-proxy uses the default group of the user it drops privilege to. -i Set ftp-proxy for use with IP-Filter. -M maxport Specify the upper end of the port range the proxy will use for the data connections it establishes. The default is IPPORT_HILASTAUTO defined in <netinet/in.h> as 65535. -m minport Specify the lower end of the port range the proxy will use for all data connections it establishes. The default is IPPORT_HIFIRSTAUTO defined in <netinet/in.h> as 49152. -n Activate network address translation (NAT) mode. In this mode, the proxy will not attempt to proxy passive mode (PASV or EPSV) data connections. In order for this to work, the machine running the proxy will need to be forwarding packets and doing network address translation to allow the outbound passive connections from the client to reach the server. See pf.conf(5) for more details on NAT. The proxy only ignores passive mode data connections when using this flag; it will still proxy PORT and EPRT mode data connections. Without this flag, ftp-proxy does not require any IP forwarding or NAT beyond the rdr necessary to capture the FTP control connec- tion. -p Set ftp-proxy for use with pf. -R address:[port] Reverse proxy mode for FTP servers running behind a NAT gateway. In this mode, no redirection is needed. The proxy is run from inetd(8) on the port that external clients connect to (usually 21). Control connections and passive data connections are forwarded to the server. -r Use reverse host (reverse DNS) lookups for logging and libwrap use. By default, the proxy does not look up hostnames for libwrap or logging purposes. -S address Source address to use for data connections made by the proxy. Useful when there are multiple addresses (aliases) available to the proxy. Clients may expect data connections to have the same source address as the control connections, and reject or drop other con- nections. -t timeout Specifies a timeout, in seconds. The proxy will exit and close open connections if it sees no data for the duration of the timeout. The default is 0, which means the proxy will not time out. -u user Specify the named user to drop privilege to, after doing pf(4) lookups which require root privilege. By default, ftp-proxy drops privilege to the user proxy. Running as root means that the source of data connections the proxy makes for PORT and EPRT will be the RFC mandated port 20. When running as a non-root user, the source of the data connections from ftp-proxy will be chosen randomly from the range minport to maxport as described above. -V Be verbose. With this option the proxy logs the control commands sent by clients and the replies sent by the servers to syslogd(8). -w Use the tcp wrapper access control library hosts_access(3), allowing connections to be allowed or denied based on the tcp wrapper's hosts.allow(5) and hosts.deny(5) files. The proxy does libwrap operations after determining the destination of the captured control connection, so that tcp wrapper rules may be written based on the destination as well as the source of FTP connections. ftp-proxy is run from inetd(8) and requires that FTP connections are redirected to it using a rdr rule. A typical way to do this would be to use either an ipnat rule such as int_if = "xl0"; rdr $int_if 0/0 port 21 -> 127.0.0.1 port 8021 tcp or a pf.conf(5) rule such as int_if = "xl0" rdr pass on $int_if proto tcp from any to any port 21 -> 127.0.0.1 port 8021 inetd(8) must then be configured to run ftp-proxy on the port from above using 127.0.0.1:8021 stream tcp nowait root /usr/libexec/ftp-proxy ftp-proxy -[ip] in inetd.conf(5). ftp-proxy accepts the redirected control connections and forwards them to the server. The proxy replaces the address and port number that the client sends through the control connection to the server with its own address and proxy port, where it listens for the data connection. When the server opens the data connection back to this port, the proxy forwards it to the client. If you're using IP-Filter, the ipf.conf(5) rules need to let pass connections to these proxy ports (see options -u, -m, and -M above) in on the external interface. The following exam- ple allows only ports 49152 to 65535 to pass in statefully: block in on $ext_if proto tcp all pass in on $ext_if inet proto tcp from any to $ext_if port > 49151 keep state If you're using pf, then the pf.conf(5) rules need to let pass connections to these proxy ports (see options -u, -m, and -M above) in on the external interface. The following example allows only ports 49152 to 65535 to pass in statefully: block in on $ext_if proto tcp all pass in on $ext_if inet proto tcp from any to $ext_if port > 49151 keep state Alternatively, pf.conf(5) rules can make use of the fact that by default, ftp-proxy runs as user "proxy" to allow the backchannel connec- tions, as in the following example: block in on $ext_if proto tcp all pass in on $ext_if inet proto tcp from any to $ext_if user proxy keep state These examples do not cover the connections from the proxy to the foreign FTP server. If one does not pass outgoing connections by default additional rules are needed. NOTES
com.apple/100.InternetSharing/ftp-proxy PF anchor is required for this daemon to correctly function. SEE ALSO
ftp(1), pf(4), hosts.allow(5), hosts.deny(5), inetd.conf(5), ipf.conf(5), ipnat.conf(5), pf.conf(5), inetd(8), ipf(8), ipnat(8), pfctl(8), syslogd(8) BUGS
Extended Passive mode (EPSV) is not supported by the proxy and will not work unless the proxy is run in network address translation mode. When not in network address translation mode, the proxy returns an error to the client, hopefully forcing the client to revert to passive mode (PASV) which is supported. EPSV will work in network address translation mode, assuming a configuration setup which allows the EPSV connections through to their destinations. IPv6 is not yet supported. BSD
March 16, 2011 BSD
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy