Red Hat / Fedora :: Netcat / Port Redirection - When A Connection Is Received On A Port Say 123?

Apr 6, 2010

i am running ncat (netcat's new version from nmap) on centos . I am listening on different ports. My question is , is it possible that when a connection is received on a port say 123, i redirect this connection to a different port and use the 123 port again for listening connections. ncat has an option -k which u can add with -l , it will force fully listen on the port. It can accept multiple connections on a single port but i want that once a client connects on to 123 port, he is forwarded to some other port and no longer on 123.

View 4 Replies


ADVERTISEMENT

Programming :: Make A Bash Script That Will Open Up Port 23 For A Netcat Connection?

Apr 14, 2009

I'm starting to like making bash scripts. It's kewl making creative ones. Right now I'm trying to make a bash script that will open up port 23 for a netcat connection. Once there's a connection, I'd like for the script to open up xmms and play a sound effect, as well as echo a txt file to the desktop saying that a connection was made at this specific time. When I execute the script, it stops exection at the first line. So far I have this:

sudo nc -lvnp 23
while [ 1 ]
do

[code]...

View 8 Replies View Related

OpenSUSE Network :: Port Redirection - Multiple IP Addresses - Or Run On Port 80

Apr 7, 2011

In SuSE firewall0. I do have a openSuse 11.4 and multiple IP addresses on eth0 interface

I run (trying to/have to) multiple TOMCAT servers.

I am trying to have each tomcat instance listen to on separate IP address for example:

What i am trying to do is to redirect

a) tomcat 1 -

a) tomcat 2 -

And so on.

I know that it has to be possible.

I do have just eth0/

Is is it possible. Do I have to create "vittual interfaces"? eth0:1, .......... and do redirection ?

"Server" has got just single interface - just 1 ethernet calbe goes to that server. I am planning to have 10-15 tomcat's on that server (I have to unfortunatley) and each has to run on port 80

Is it possible to "grant" permissions to normal users to run app on port 80 - that would solve me lots of problems if impossible to redirect.

I tried to setcap 'cap_net_bind_service=+ep' /path/to/tomcat ...... but no luck

View 7 Replies View Related

Fedora Networking :: Port Redirect, I.e. Whatever Comes Through Whatever Interface On Port AAAA Will Get Redirected To Port BBBB?

Feb 18, 2010

I want to do a simple port redirect, i.e. whatever comes trough whatever interface on port AAAA will get redirected to port BBBBI thought that iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport AAAA -j REDIRECT --to-ports BBBBhowever it doesn't work, e.g. nc -v -w2 -z localhost AAAA gives:

nc: connect to localhost port AAAA (tcp) failed: Connection refused
while
nc -v -w2 -z localhost BBBB

[code]....

View 10 Replies View Related

Debian Configuration :: Port (exp. 1001) Have 20 Connections That The Next New Connection Forword To An Other Port (exp.1002)?

Jul 15, 2011

i want if a port (exp. 1001) have 20 connections that the next new connection forword to an other port (exp. 1002).

View 2 Replies View Related

General :: When To Do Port Redirection

Feb 10, 2010

Under what condition port redirection could go useful?

View 2 Replies View Related

OpenSUSE Network :: Port Forwarding Not Working - Tests Using Netcat

May 17, 2011

I have two SUSE(2.6) virtual machines running in the same subnet with two network cards each as shown below.

VM1------------------------------------------------------------------------------
appstage1:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:22:5A:24
inet addr:192.168.128.12 Bcast:192.168.128.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe22:5a24/64 Scope:Link

[Code]....

Ultimately my DB will run in VM2 and any DB requests coming in at 2055 of VM1 should be forwarded to port 2055 of VM2. Since I do not yet have a DB running I am trying to test with netcat.

View 5 Replies View Related

Software :: Capturing Data From IP Port In Background Using Telnet Or Netcat (nc)?

Mar 4, 2010

I'm trying to capture incoming/outgoing phone call data. Both telnet and nc have allowed me to easily direct this data to a file for later processing, HOWEVER I can't seem to get either to work as a background process. I want to put the connection into a shell script and run from cron.

View 4 Replies View Related

Networking :: Allow A Port Redirection For Rdp Clients?

Jan 27, 2010

Ok, here goes, I have a rdp server sitting at a remote store which is behind a router I do not control.

I might be able to get the phone company to add routing to it but at the moment I'd like to do this with ssh and reverse port routing, because I might need this for other ports later and I never know if the phone company wont break other routings already in place or just screw up the entire thing .

I am able to have a linux box at the site ssh into a server located where I'm at and reverse port forward port 3389 to that server. I can also then ssh into that server from my linux box and port forward 3389 to my box, under another port since my 3389 is already in use. Finally I can use rdesktop to rdp on the my local box which bounces it through the server and back to the linux box which forwards it to the rdp server (A Windows 2008 server to be exact). This is all well and good and works reasonably fast, but, I need to be able to have users on windows boxes at my site do this without all of the rigmarole. I need to, I guess, redirect a normal open port, or create one, on the server where I am so that it connects internally to the reverse forwarded port or open the internal port to the outside. So I guess I need to make it a 'gateway' for that one port, this way all I have to do is point the rdp clients at the main server and port to have it eventually connect to the rdp server in the remote store.

how to go about doing it. I guess I need an iptables entry forwarding the port but I'm not sure what is should be.

The other option is opening up the port 3389 to the outside but I'm not sure how to do that either. Right now I have no iptables entries at all but even if I turn off iptables completely port 3389 is not available if I try to use it from another pc on the network but I can rdp from the server itself using the 3389 port so I know it's working internally.

View 2 Replies View Related

Networking :: Use Port Redirection Using Iptables?

Jun 17, 2010

There is this server where in I want to use port redirection using iptables. For port redirection I have used nat table with PREROUTING chain and REDIRECT option. Like:

Code:
iptables -t nat -A PREROUTING -p tcp --dport pop3 -j REDIRECT --to-port 8110
It just does not work. I have tried to redirect other ports as well but nothing works.

[code]....

View 15 Replies View Related

Networking :: Port Redirection In Same Machine

Mar 29, 2009

I am using squid proxy server in my Linux machine for caching. Now i want run my squid in transparent mode not set proxy settings in browsers.Like squid is running port 3128. If we redirect the port 80 packets to port 3128, looping is occurred.How to avoid looping?

View 5 Replies View Related

Server :: Apache Port Redirection?

Mar 25, 2011

I'm running a server with Ubuntu 10.04 installed. I recently set up a VirtualHost (I'll call it my.website.com), like I have in the past without any problems. But this time, I'm stumped. When I connect to my.website.com, it should hit port 80, right? It doesn't; rather, it hits port 8000. I don't have any rewrites/redirections (I checked wherever possible) and checked apache2.conf (httpd.conf is empty).

View 5 Replies View Related

Networking :: Ethernet Port Connection With An E1/T1 Port

Aug 30, 2010

i have an embbeded hardware that uses bootp for booting from a Network Managemnt Host (NMH)on the same ethernet. The embedded hardware has both kind of ports i.e ethernet as well as E1/T1. I would like ask, what do i require to establish a communication-link between the embedded hardware and the NMH throuh E1/T1 ports of embedded hardware, so as to make it boot through from E1/T1. Further, NMH possesses only ethernet port. Just to refine my questions i'd like to know what additions do i need to do on my NMH , like may be i have to put an E1/T1 port or is it possible that the E1/T1 port can be directly connected to an ethernet port on the other host.

pardon me if i am not making absolute sense here as my knowledge is limited on Layer 1 and layer 2.

View 3 Replies View Related

Networking :: Port Redirection To Internal Network NAS Box

Jan 17, 2011

I'm have a base level understand of linux at this point. I have Debian box that I am trying to do some port redirection with.

I have my external NIC as eth0 with an IP of x.x.250.5.
I have my internal NIC as eth1 with an IP of 192.168.1.1.

On the internal network I have a NAS box with a web interface at 192.168.1.100. What I need is to set it up so that a request to x.x.250.5:8080 will some how forward/redirect to the internal network NAS box at 192.168.1.100:80.

View 3 Replies View Related

Ubuntu Servers :: Port 21 Reported Open By Nmap And Netcat, But Blocked By Iptables?

Oct 11, 2010

Strange issue here when trying to verify firewall on Server 8.04. No ftp service running at all on server, but both nmap and netcat report port 21 as being open, even though it isn't.I am 100% sure that port 21 is not actually accessible and iptables rules are fine. Trying to connect to the port fails, yet nmap and netcat seem to report a "false positive"?Have also checked on a number of other servers I'm running, and this "false positive" seems to apply to all of them.

View 1 Replies View Related

CentOS 5 Networking :: Received Tcn Bpdu On Port?

Jun 8, 2009

i am using centos 5.2 . recently i have implementing transparent proxy but i faced issue. i received lots of messages in dmesg. i have 2 machine with same OS another machine are works fine with this same configuration

br0: received tcn bpdu on port 1(eth0)
br0: topology change detected, propagating
br0: received tcn bpdu on port 1(eth0)
br0: topology change detected, propagating
br0: received tcn bpdu on port 1(eth0)

[Code]...

View 1 Replies View Related

Server :: Postfix Port - Send Message Via Port 587 Not Port 25

May 2, 2010

I have a mail server i need it to send message via port 587 not port 25, i make some changes to my postfix server which i use and it is already successed making a telnet to 587 port like it :

[Code]....

View 3 Replies View Related

Ubuntu :: Netcat Output Pipes And Redirection ?

May 25, 2010

I'm trying to redirect nc command output but I can't do it.

I have tried this:

And this:

But it seems doesn't work.

View 3 Replies View Related

Fedora :: Share WLAN Connection Over Ethernet Port?

Dec 20, 2009

I created a wireless ad hoc network using network manager. That was simple. I have friend who doesn't have a wireless card, and still would like to join the LAN. It would be nice if he could have a different IP address Is this possible?

View 2 Replies View Related

Fedora Networking :: Ssh: Connect To Host 192.168.1.100 Port 22: Connection Refused

Nov 27, 2010

I have my desktop computer (running F13) configured to accept ssh over port 22 via the firewall configuration tool. If I type ifconfig -a, this computer, which is running on my wireless network, tells me:

Code:

inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

However, if I go to my laptop computer (also running F13) and try and ssh into the desktop, i.e. ssh icthy@192.168.1.100, I get this response:

Code:

ssh: connect to host 192.168.1.100 port 22: Connection refused.

I guess I am confused to what is blocking the connection? Is there another means on F13 other than the default Firewall? I haven't really messed with the network at all. For what it's worth, I am hoping to set things up so I can just ssh into the computer name, (ssh icthy@desktop) eventually, but want to start with the IP. So, can anyone offer a hint as to what I can look for that is blocking port 22?

View 3 Replies View Related

Fedora Networking :: 3G USB Modem Has Wrong Device Port In NM - Change Device Port In Network Manager?

Aug 14, 2009

I installed ZTE MF 626 modem in my F10 with kernel 2.6.27.12-170, i run usb_modeswitch and so far things happened normally. Watching through /var/log/messages it says that F10 detects two port device for this modem: ttyUSB1 and ttyUSB2, and in the sequence it disable port ttyUSB1 BUT Network Manager still set this port.I mean, when i connect via wvdial appointing to ttyUSB2 i get connection, but Network Manager fails to do it appointing to ttyUSB1. How to change device port in Network Manager?

View 1 Replies View Related

General :: SFTP Server Port Blocked On Uni Network / Need To Change Listening Port

Oct 21, 2010

VERY new to linux, erm but I have an issue that needs solving!I recently moved to university, where their network blocks sftp port 22, this means that I cannot connect to my FTP server which is running a version of linux.Now I've got this ftp server connected to a seedbox and it was created using the following walk through..Code:I have written this guide for a friend, but I though it would be useful for others as well.

There are several guides floating around, but I found that most always cock up in some way. This one is tried and tested to work on Debian Etch (on an OVH rps, but should apply to most servers).If there is a new stable release of rtorrent/libtorrent then I will update this guide to show you how to update it (without reinstalling the whole server).

At the bottom there are also instructions to install ftp access & some network monitoring software.Basically, I would really like someone to be able to construct the commands on how to change the listen port for sftp connection on linux or add another port to the list that Linux would use so that I could put in through putty.

View 2 Replies View Related

General :: Warning: Remote Port Forwarding Failed For Listen Port 7869

Jul 20, 2010

I tried to make "ssh tunneling", but failed and got this message.

Quote:

Administrator@windstory-PC /
$ ssh -R 7869:localhost:7869 windowsstudy@192.168.0.4
windowsstudy@192.168.0.4's password:

Warning: remote port forwarding failed for listen port 7869 Last login: Wed Jul 21 01:56:04 2010 from 192.168.0.2 -bash-3.2$

1. system environment

192.168.0.2 - windows 7 + copssh
192.168.0.4 - centos 5.4 x86 + openssh

2. Guide for setting "ssh tunneling"

[URL]

3. Added this to sshd.conf

Quote:

AllowTcpForwarding yes

4. "netstat -na|grep 7869" at 192.168.0.4

Quote:

[root:maestro:~]# netstat -na|grep 7869
tcp 0 0 0.0.0.0:7869 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7869 127.0.0.1:53539 ESTABLISHED

[code]....

5. result of "ssh -vvv -R 7869:localhost:7869 windowsstudy@192.168.0.4"

Quote:

debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password

[code]....

6. I added 7869 for telnet service as follow;

Quote:

mytelnet 7869/tcp # My Telnet server

View 1 Replies View Related

Ubuntu Security :: SSH Port Forwarding, Disable Or Edit A Forwarded Port?

Nov 1, 2010

sudo ssh -L 750:192.168.123.103:873 username@192.168.123.103It does exactly what it's supposed to do, but how do i edit / remove this rule?Is there some config file where i can alter the forwarding? How does it get stored?Im using Ubuntu 10.10Server Edition (allthough i recon it would be pretty much the same across all versions

View 5 Replies View Related

Security :: Iptables: Verify Traffic On Port To Check If It Is Legitimate For That Port?

Apr 18, 2011

Is there any way to verify if packets being trafficked over a certain port are valid for the service you want to use this port for?

One obvious example that probably clarifies my question:
When I open port 443 (outgoing or incoming) for https/ssl traffic, I don't want this port to be used for say openvpn traffic.
Thus: when someone wants to surf to a website with https, it should be ok but if someone wants to connect to his home openvpn server over that same port, it should be blocked.

View 5 Replies View Related

Ubuntu :: Port Forwarding Crutch - Number Of Apps That Are Unable To Have The Outgoing Port Changed ?

Mar 28, 2010

I'm not that great with mailservers, and just been thrown a curveball with a MS Exchange environment for which there is apparently no solution... yeah, right. But is there a workaround?

The problem is that the site mail (SMTP) needs to be sent via port 26 instead of the commonly used 25. Port 25 is mapped to a mailfilter, which apparently causes havoc with some of the mail, and the techs that have been on site trying to coax the Exchange server to co-operate have said that the only way would be to get rid of the filter.

The problem is that there are number of apps that are unable to have the outgoing port changed and so keep sending mail out on port 25.

I look after the Unix/Linux side of things at work, and I was wondering if there was an easy way to set up a Ubuntu box to receive mail on port 25 and just forward it to the MS box on port 26? So, in other words (and I hope this makes sense): monitor port 25, and forward whatever comes in on port 25 to the server on port 26. Simple portforwarding, or is it? What steps do I need to take?

View 2 Replies View Related

Ubuntu Networking :: Error - Remote Port Forwarding Failed For Listen Port 5500

Aug 7, 2010

When I use the following command:

ssh user@ssh_server -L 5500:localhost:5500 -p 22

everything works fine. I can log in, and local port forwarding is done. Otherwise when I use the command:

ssh user@ssh_server -R 5500:localhost:5500 -p 22

I get an error "remote port forwarding failed for listen port 5500". However when I try remote port forwarding in WinXP by use of putty there is no problem...

View 2 Replies View Related

Networking :: Use Iptables In Order To Forward All The Incoming Packets For Port 5555 To Port 5556?

Apr 4, 2011

I'm trying to use iptables in order to forward all the incoming packets for port 5555 to port 5556 on the same server (192.168.2.101).

I wrote the following commands:

iptables -A PREROUTING -t nat -i any -p tcp --dport 5555 -j DNAT --to 192.168.2.101:5556
iptables -A FORWARD -p tcp -m state --state NEW -d 192.168.2.101 --dport 5556 -j ACCEPT

View 3 Replies View Related

OpenSUSE :: Set RxtxSerial - Java App Has Access To A Serial Port (via SiLabs CP210x Driver, Port /dev/ttyUSB0)

May 10, 2010

I'm trying to set rxtxSerial to work so a Java app has access to a serial port (via SiLabs CP210x driver, port /dev/ttyUSB0). When I use update-alternatives --config java, there are 3 alternatives which provide `java'. I have tried openJDK and Sun. Both fail but with completely different messages.

[Code].....

View 9 Replies View Related

Networking :: Iptables Can't Port Forward (PAT Port Address Translation)?

Feb 20, 2010

I'm using a Debian servers, as router/firwall.. I've two ethernet interfaces into the server, one for wan and one for lan. The i use SNAT so my LAN clients can access the internet throgh the debian router. That is working... Now i want to be able to access servers on the LAN site from the WAN site, and i wanna use port address translation (PAT). I have a FTP server running on a lan server, so i'm trying to portward port 21.

iptables -t nat -A PREROUTING -p tcp -i eth1 -d (WANIP) --dport 21 -j DNAT --to 192.168.1.2:21

When people try to access my FTP from the WAN site, they are redirected to the local FTP server, and they are promted for crendentials, but when the credentials are typed, and the local ftp server should answer the wan request, the connections dies.

The wan clients are being promted for credentials, so they are redirected to the local lan server, but after that the connections dies, so i think there is some kind of nat problem, when the local lan server is trying to respond to the wan request..

Here i my iptables script:

#flush table
iptables -F
#input regler

[code]....

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved