Networking :: Ssh Listening To A Non-standard Port?
Oct 2, 2010
I am running Ubuntu 64-bit and I have been trying to set up an ssh connection between the Ubuntu server and a Windows 7 client (using putty) and when I enter the command:
Code:
sudo netstat --inet -lpn | grep sshd
I get the following:
I'm using iptables with modules ip_contrack_ftp to be able to use passive ftp. It works well as long as port 21 is being used as listening port. Is there any way to make it work when I configure my ftp server (vsftpd) to listen on an alternative port, lets say 21001 or something? The helper module only seems to be working properly with the standard port, so I was wondering whether there was a way to "tell it" that another port is being used? I mean, of course I make a rule in fw to allow traffic to the alternative port.
But once it's time to start passive connection, then the iptable module cannot handle it properly. I could solve the problem by making a range of passive ports in the ftp-server configuration and allow the incoming traffic to them, but then using helper modules doesn't make any sense. I just want to allow the traffic to the listening port and then want the ip_contrack_ftp module to take care of the rest. This is what I do today - but only port 21 seems to be working. Is there a way to do this with a non-standard ftp port?
is it possible using a perl script to test for a socket listening on a UDP port on a remote host ?I work in an environment where netcat is not allowed and from time to time I need to see if a UDP port is open on a remote host.
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.
I edited "sshd_config" file and changed port 22 to a new port. After I restart ssh, it listens on port 22 and the new port. How can I disable SSH to listen on port 22? I'm using Debian.
I just upgraded from FC 13 to FC 14. I run an ssh server on a port in the 3000s (call it 3xxx, to protect the innocent). When I try to start sshd with the "Port 3xxx" option in sshd_conf, I get the following error in /var/log/secure
sshd[5104]: error: Bind to port 3xxx on 0.0.0.0 failed: Permission denied. sshd[5104]: error: Bind to port 3xxx on : : failed: Permission denied.
I did not use to have this problem in FC 13. how I can give sshd the necessary permissions now?
When I do netstat -pantu it shows a dash where the pid would be. I have also checked lsof -i and see no pid associated with the port. How do I find what program is keeping the port open?
I know that ports are, by default, not filtered; they simply don't respond to requests if there are no services listening on the port. Well, running netstat -tulpn gives:
Currently Im having a syslog server that consolidate firewall logs on port 514 udp. Im also having a IDS device that I wish to push its logs to this particular syslog server so that I can retrieve my IDS logs on this server as well.
Is it possible to do so?Having syslog listening on port 514 for both firewall and IDS logs? If it is possible will the logs be recorded in a single log file?Or will it be recorded in a separate log file ie. firewall.log, IDS.log etc?? I wish to have them in separate individual log files or else there will be hard time segregating the log entries in a single file. Can anyone advice on how to achieve this??
i tried my best andwrite all the commands given below. but port 27000 is not in listening state.Note: I spoofed MAC address (change MAC address)on this MAchine.here is my iptables file.
# Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter
I am learning network prgramming in linux in c,and try to build a server and in this server I want to bind the listening socket to a paricular Ip address and port.Bind function is showing error,I did not want to use wild card. Here is the code.
I have been struggling with this for the past two days and I can't seem to figure it out.SIMPLE GOAL: use subdomains with my wildcard Rapid SSL cert on Apahce2. This is not a chained certificate.Currently my default SSL virtual host, listening on 443 works fine. So, https://www.myDomain.com is recognized correctly by all browsers. But, the below virtual host listening on port 1025 is not coming across to the browser securely. The page renders, but the browsers do not see it as encrypted SSL.
It appears that my ISP is blocking port 80, so I can't set up a proper website on my home computer. I'd like to choose a different port to use (they block 443 also), and I'm not sure how to do this with Fedora (or any Linux flavor for that matter
My question regards available hardware... an adapter taking a USB plug_ at end of a mic cable_ which adapter would then connect to the computer's standard audio/mic input.
Anybody seen such an adapter ? After looking an hour or so this morning on USB gadget sites, I found lots of the audio-mic-plug-TO-usb adapters, but this again is the opposite of what I need.
The problem Im having is with older versions of a sound app I use (audacity)_ newer versions of this specifically support USB mics_ but_ that feature is missing in older versions.
Assuming audacity will treat any legal connection via audio port as "mic"
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
The issue is that my CentOS workstation is in a vlan from where the Intranet's DNS servers are unreachable. For browsing the web there is an ISA proxy server, which I presume resolves DNS for my firefox. However, wget, host, ping and aria2c fail to get any sort of DNS resolution since they're being run from command line.I have exported HTTP_PROXY value, which provides me internet access on console, but,only when I connect using IP address. It fails on name resolution.
My question is:May I redirect the DNS queries to my home PC which would be running a DNS server on a non standard port?I was thinking of putting nameserver 127.0.0.1 in /etc/resolv.conf and then put iptables rule to redirect 127.0.0.1:53 UDP to a.public.ip.address:3535 UDP..I don't know if I am shooting blanks or what, I am not very much aware of this kind of setup.My main need is to provide DNS resolution to console apps.I want to utilize my company's idle bandwidth for bulk downloads, so, using proxy, SSH tunneling through my Home PC is out of question.
I run various manual checks on my system to see if there's anything I can't account for and just one such instance just got thrown up here. I reproduce the output from netstat below. I see there is something called "microsoft-ds" shown as listening. What on earth is this doing on my PCLinuxOS box? I have googled it and there does appear to be some security issues related to it for Windows users and all the advice relating to it that I could find is for Windows users, but I am just baffled as to what this is doing on my Linux system.
In emule p2p filesharing there's this thing called the id that is low if you do not configure your router for certain ports to be listening for incoming connections, forwarded by the router to ports on your pc. When the id is low, your downloads take longer or something like that. But if you have no listening port, how can a peer download from you?
root@HOST [~]# /etc/init.d/httpd start Starting httpd: no listening sockets available, shutting down Unable to open log [FAILED] root@HOST [~]# /etc/init.d/httpd restart Stopping httpd: [FAILED] Starting httpd: no listening sockets available, shutting down Unable to open logs [FAILED] root@HOST [~]# tail -n 10 /var/log/messages Sep 29 17:59:30 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv4 for mDNS. Sep 29 17:59:30 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv4 with address 196.219.240.236. Sep 29 17:59:30 localhost avahi-daemon[2870]: Registering new address record for 196.219.240.236 on wlan0. Sep 29 17:59:31 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv6 for mDNS. Sep 29 17:59:31 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e. Sep 29 17:59:31 localhost avahi-daemon[2870]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0. Sep 29 17:59:31 localhost NetworkManager: <info> (wlan0): device state change: 7 -> 8 Sep 29 17:59:31 localhost NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS. Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) successful, device activated. Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete. What is the problem I have a local server CentOS Linux
Looking for a test tool where I can fire up any number of ports (TCP and / or UDP) to listen on.
I am currently getting my using nc but its only 1 port at a time (i know I can open up multiple sessions but thats cumbersome), it can't do UDP, and it closes at the end of the session.
A friend has suggested socat but it looks pretty much the same except it can do UDP, but also cumbersome, I have to manually output to a different file per port, etc.
Basically its so I can quickly test firewall and NAT rules.
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...
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.
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..