Dear Team,
Whether it is possible to create host entry on proxy for particular Public IP instaed of forwarding ?
Dear Team,
Whether it is possible to create host entry on proxy for particular Public IP instaed of forwarding ?
Note the following:
For security update information, select your product from http://support.attachmate.com/security/.
Reflection Secure Shell provides the following functionality:
The security matrix presented below lists Reflection Secure Shell parameters and recommends how each parameter should be configured to provide minimum, medium, or high security for your PC-to-host connection.
A complete listing of SSH configuration parameters, definitions of these settings (including those shown and not shown in the following table), and each settings’ default configuration can be found in each product’s Help documentation available from http://support.attachmate.com/manuals/.
Secure Shell Parameter |
Minimum Security |
Medium Security |
High Security |
Dialog Box [*a] |
ChallengeResponseAuthentication |
no (this parameter applies only to SSH1) |
no (this parameter applies only to SSH1) |
no (this parameter applies only to SSH1) |
|
Cipher |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
X |
Ciphers [*b] |
aes128-ctr, aes128-cbc, 3des-cbc, blowfish-cbc, aes192-cbc, aes256-cbc |
aes128-ctr, aes128-cbc, aes192-ctr, aes192-cbc, aes256-ctr, aes256-cbc, 3des-cbc, blowfish-cbc |
aes256-ctr, aes192-ctr, aes128-ctr |
X |
ClearAllForwardings |
yes |
yes |
yes |
|
CompressionLevel |
no (default) |
no (default) |
no (default) |
X |
ConnectionReuse |
yes (default for GUI applications) |
no |
no |
X |
DynamicForward |
do not use |
do not use |
do not use |
|
FIPSMode |
no (default) |
yes |
yes |
X |
GatewayPorts |
no (default) |
no |
no |
|
GssapiAuthentication [*d] |
no (default) |
yes |
yes |
X |
GssapiDelegateCredentials [*c] |
no (default) |
yes |
no |
X |
GssapiUseSSPI [*e] |
no (default) |
yes |
yes |
X |
HostKeyAlgorithms [*c] |
x509v3-rsa2048-sha256, x509v3-sign-rsa, x509v3-sign-dss, ssh-rsa-sha2-256@attachmate.com, ssh-rsa,ssh-dss (default) |
x509v3-rsa2048-sha256, x509v3-sign-rsa, x509v3-sign-dss, ssh-rsa-sha2-256@attachmate.com |
x509v3-rsa2048-sha256, x509v3-sign-rsa, x509v3-sign-dss, ssh-rsa-sha2-256@attachmate.com |
|
KbdInteractiveAuthentication |
yes (default) |
no |
no |
X |
KerberosAuthentication |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
X |
KerberosTgtPassing |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
do not use (this parameter applies only to SSH1) |
X |
KexAlgorithms [*c] |
diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1, diffie-hellman-group14-sha256 (default) |
diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1, diffie-hellman-group14-sha256, gss-group1-sha1-* |
diffie-hellman-group14-sha256, diffie-hellman-group14-sha1, gss-group1-sha1-* |
|
Macs [*c] |
hmac-sha256, hmac-sha2-256, hmac-sha1, hmac-md5, hmac-ripemd160, hmac-sha1-96, hmac-md5-96, hmac-sha512, hmac-sha2-512 (default) |
hmac-sha256, hmac-sha2-256, hmac-sha1, hmac-sha512, hmac-sha2-512 |
hmac-sha256, hmac-sha2-256, hmac-sha512, hmac-sha2-512 |
|
PasswordAuthentication |
yes (default) |
no |
no |
X |
PreferredAuthentications |
include all methods except: none |
include all methods except: password, none |
include only: publickey, gssapi-with-mic |
X |
Protocol |
2 |
2 |
2 |
X |
PubkeyAuthentication |
yes (default) |
yes (default) |
yes (default) |
X |
RSAAuthentication |
no (this parameter applies only to SSH1) |
no (this parameter applies only to SSH1) |
No (this parameter applies only to SSH1) |
X |
StrictHostKeyCheck ing |
ask (default) |
ask (default) |
yes |
X |
[*a] In the Dialog Box column, an “X” denotes that the parameter can be configured from either the Reflection interface or by editing the “My DocumentsAttachmateReflection.sshconfig” file. Parameters that are not marked with an “X” can be configured only from the config file. For more details, see the following sections.
[*b] The AES _ctr mode encryption algorithms are available in Reflection version 14.1, Reflection 2011, Reflection 2014, and EXTRA! 9.2 or higher.
[*c] The hmac_sha2 Macs, sha256 host key digital signature and sha256 key exchange algorithms are available in Reflection 14.1 SP3, EXTRA 9.3, Reflection 2011 R3 or higher, and Reflection 2014.
[*d] GSSAPI authentication requires that a Kerberos Key Distribution Center be set up and configured.
[*e] GssapiUseSSPI authentication requires that a Microsoft Windows Domain be set up and all systems be joined to the domain.
Reflection Secure Shell security parameters can be configured by manually editing the “My Documents/Attachmate/Reflection/.ssh/config” file, or through the Reflection interface. When selecting which configuration method best suits your needs, consider the following:
To set the config file for basic minimum, medium, or high security, copy and paste the appropriate section below into your “My DocumentsAttachmateReflection.sshconfig” file.
Host Bluebell Protocol 1 PasswordAuthentication yes Host Redrose Protocol 2 CompressionLevel 6 |
For example, in the sample below the Protocol and PasswordAuthentication parameters would apply to host Bluebell.flowers.com, and the CompressionLevel and LogLevel parameters would apply to all hosts in the domain, *.mycompany.
Host Bluebell.flowers.com Protocol 1 PasswordAuthentication yes Host Greenglass.mycompany.com Protocol 2 LogLevel QUIET Host *.mycompany CompressionLevel 6 LogLevel INFO |
If multiple “Host” sections apply to the host a user is connecting to (as with Host Greenglass in the example above), the first parameter in the first applicable Host section in the file is used. Therefore, if using wildcards to specify a group of hosts, it is helpful to place more specific host entries at the beginning of the file, and wildcard entries at the end of the file – unless you want the setting to override that specific keyword for all matching hosts.
Note that only keywords containing non-default settings are included:
Ciphers aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256
ClearAllForwardings yes
Protocol 2
RSAAuthentication no
Note that only keywords containing non-default settings are included:
ChallengeResponseAuthentication no
Ciphers aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,3des-cbc,blowfish-cbc
ClearAllForwardings yes
KbdInteractiveAuthentication no
Macs hmac-sha256,hmac-sha2-256,hmac-sha1,hmac-sha512,hmac-sha2-512
Protocol 2
PasswordAuthentication no
PreferredAuthentications external-keyx,gssapi,publickey
RSAAuthentication no
GssapiAuthentication yes
Note that only keywords containing non-default settings are included:
ChallengeResponseAuthentication no
ClearAllForwardings yes
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
Macs hmac-sha256,hmac-sha2-256,hmac-sha512,hmac-sha2-512
KbdInteractiveAuthentication no
PasswordAuthentication no
PreferredAuthentications gssapi
PubkeyAuthentication no
RSAAuthentication no
StrictHostKeyChecking yes
GssapiAuthentication yes
Some Secure Shell settings can be configured through the Reflection interface. Settings configured from the Reflection interface are saved per connection and apply only to single host connections.
Note: To configure global Secure Shell settings for connections, use the config file (see Using the Config File), or create an SSH config scheme from within the user interface.
To configure Secure Shell settings using the Reflection interface, follow the steps below:
For Reflection 2011 and Reflection 2014:
- Select Secure Shell
- Enter a host name
- Select Configure additional settings
- Click OK
For Reflection for UNIX and OpenVMS and Reflection for HP with NS/VT:
For Reflection X:
For Reflection FTP Client:
Secure Shell Parameter |
Configured Using… |
Cipher |
Encryption tab. View SSH protocol 1. Note: Cipher settings apply only to SSH1, which has been deprecated. Using SSH2 is highly recommended. |
Ciphers |
Encryption tab. Under SSH protocol 2, remove any SSH protocol 2 ciphers you do not wish to use and order the remaining protocols by preference. |
CompressionLevel |
General tab. Select or clear Enable compression .Note: The compression level slider control applies only to SSH protocol 1. |
GssapiAuthentication |
General tab. Under User Authentication, select or clear GSSAPI/Kerberos . |
PasswordAuthentication |
General tab. Under User Authentication, select or clear Password . |
Protocol |
General tab. On the Protocol drop-down list, select a protocol. |
PubkeyAuthentication |
User Keys tab. Click the Generate Key button. Select your options (for example, RSA or DSA for Key Type) and click Create. General tab. Under User Authentication, select or clear Public Key .Note the following: If PubkeyAuthentication is enabled, you must also copy the public key from "My DocumentsAttachmateReflection.sshid_rsa.pub" or "My DocumentsAttachmateReflection.sshid_dsa.pub" to the host. For details, see the Reflection online help. |
RSAAuthentication |
User Keys tab. Click the Generate Key button. From the drop-down Key Type list, select RSA1. Select other options and click Create. Note the following: If RSAAuthentication is enabled, you must also copy the public key from "My DocumentsAttachmateReflection.sshidentity.pub" to the host. For details, see the Reflection online help. RSAAuthentication applies only to SSH1, which has been deprecated. Using SSH2 is highly recommended. |
System administrators can simplify user setup by deploying system-wide (global) Secure Shell settings to client computers.
When you close the Reflection Secure Shell Settings dialog box, non-default configuration information is saved automatically to <My Documents>AttachmateReflection.sshconfig.
When you make connections, known host information is saved to <My Documents>AttachmateReflection.sshknown_hosts.
The procedure depends on which product you are using.
Go to Help > Help Topics and see “Deploying custom Secure Shell settings in Reflection 14.0.x.”
For general deployment information, see the System Administrator Guide at http://docs.attachmate.com/reflection/14.1/r14_1sag.pdf.
Go to Help > Help Topics and see the topic “Deploying Secure Shell Settings in Reflection for Secure IT 7.0.x”.
For general deployment information, see the User Guide at http://support.attachmate.com/manuals/rsit_win_client.html.
Click Help > Contents > Secure Connections > Secure Shell Configurations Files, and see “Deploy Secure Shell Settings with a Companion Installer.”
For general deployment information, see “Installation and Deployment Guide” at http://docs.attachmate.com/reflection/2014/r1/deploy/deploymentguide.pdf.
Click Help > Contents > Secure Connections > Secure Shell Configurations Files, and see “Deploy Secure Shell Settings with a Companion Installer.”
For general deployment information, see “Installation and Deployment Guide” at http://docs.attachmate.com/reflection/2011/r3/deploy/deploymentguide.pdf.
The Deployment Guide for Reflection X 2011 and Reflection Suite for X 2011 is available at http://support.attachmate.com/manuals/rx_rsx_2011.html.
See “Customizing the EXTRA! X-treme Installation" in Help: http://docs.attachmate.com/extra/x-treme/9.2/help/en/index.htm.
See “Appendix C: Attachmate Customization Tool Reference” in the Product Guide at http://docs.attachmate.com/infoconnect/ented/9.1sp1/pdf/product_guide_infoconnect.pdf.
Review these points to help determine how strictly you want to control user configuration functionality.
Beyond configuring Reflection Secure Shell, there are many other things administrators can do to help secure a PC-to-host connection. The following is a list of additional steps to consider when designing your security environment.
Note: This list is non-inclusive. Many other security steps may be necessary in your network environment; however, the suggestions on this list should be considered when establishing your security policies.
For general information about SSH1 and SSH2, as well as information about SSH servers and clients, see the OpenSSH web page, http://www.openssh.com.
SSH is a set of computer applications based on the IETF Internet-Draft for the Secure Shell protocol. SSH provides strong, encrypted authentication and a secure encrypted tunnel through which users can execute commands and move data. The current version of Secure Shell is ssh-2. (The ssh-1 protocol is deprecated; therefore, it is highly recommended that you use ssh-2.)
For more information about Secure Shell, see “Fortified SSH: A Cost-Effective Way to Safeguard Your Network” on the Attachmate web site at http://www.attachmate.com/WhitePapers/Literature_0954.htm.
The Reflection Secure Shell Client is included in Reflection version 12.0 or higher.
To tunnel a Telnet session through an SSH connection, you must establish the SSH connection, then configure Reflection to redirect Telnet through the SSH tunnel. To do this, you must create two Reflection settings files, one to configure and start SSH, and one to configure and start the Telnet session.
Figure 1 – Telnet Port Forwarding
Note: Both connections must remain open for port forwarding to be available. The SSH connection window may be minimized. If the user tries to log off or close the SSH connection while the Telnet session is being tunneled, they will be unable to do so. The SSH session will remain open until the Telnet session is terminated.
Follow the steps below (for the appropriate Reflection product) to create a settings file that opens a Secure Shell connection to your secure host.
Important: Localhost is used for the remote machine if the Telnet server you are connecting to is running on the same server where the SSH daemon resides, which is often the case.
If the SSH daemon resides on a different host than the host you are connecting to with Telnet, enter the name of the host you are connecting to with Telnet in the ‘to remote’ field. In this instance, the telnet connection between the Reflection Secure Shell client and the SSH daemon is secure, but the Telnet connection between the SSH daemon and the target host is not secure.
Important: Localhost is used for the remote machine if the Telnet server you are connecting to is running on the same server where the SSH daemon resides, which is often the case.
If the SSH daemon resides on a different host than the host you are connecting to with telnet, enter the name of the host you are connecting to with telnet in the ‘to remote’ field. In this instance, the telnet connection between the Reflection Secure Shell client and the SSH daemon is secure, but the telnet connection between the SSH daemon and the target host is not secure.
Figure 2 – Add Local Port Forwarding
Follow the steps below to create a settings file that starts a Telnet session over the port that you have redirected to connect through SSH.
Figure 3 – Reflection Workspace New Document Icon
Once you have created the Secure Shell and Telnet settings files, follow these steps to tunnel Telnet through the secure pipe.
Follow the steps below to verify that your Telnet session is running through the SSH tunnel.
Note: If the netstat command is not recognized, navigate to the C:WindowsSystem32 directory and enter the command again.
If the port forwarding is successful, you should see a response similar to the following:
Active Connections Proto Local Address Foreign Address State TCP MY_PC:2460 my.server.com:22 ESTABLISHED TCP MY_PC:1025 localhost:2461 ESTABLISHED TCP MY_PC:2461 localhost:1025 ESTABLISHED |
In the example above, the first TCP row shows the SSH connection from port 2460 (a random port) on the workstation to port 22 (the default SSH port) on the SSH server.
The second and third TCP rows show the Telnet connection between port 1025 on the workstation, the port that has been configured to redirect Telnet connections (port 23) through the SSH tunnel (port 22), and a random port (2461) on the SSH server.
Note: If the second or third row shows the actual host name, such as my.server.com, instead of localhost, the tunnel has failed and the Telnet connection is not encrypted.
.
I have a BT hub 6A it’s my 4th one.
So my walls are thin enough for me to know my neighbours have hacked me. I can often hear them bragging about it. I’ve called BT so many times like more than 15 and they say it’s fine their end but yet every device I have has been modified. Anyway.
I have used an app called Fing to do some port scans and to get some info. I have screenshots but I can’t put them up in here by the looks of it.
Anyway my router shows up as BTHUB.
It says it’s netbios name is BTHUB (have no idea what that is) and it’s saying it’s a file server.
So a scan reveals that the following ports are open
53
Domain name server
80
Http
But then I get this
139
Netbios-ssn
443
Secure World Wide Web ssl
445
Microsoft-ds
Smb directly over IP
8888
Sun-answerbook
Sun answer http server or gnump3d streaming music server
10080
Amanda
Amanda backup util
Sometimes I’m getting a upnp port opening as well on 1900
5000
When I use another device I constantly have this port open
62078
Iphone-sync
I read online that apparently this is a way that some hackers are able to remotely access devices.
Is there anyone who can tell me what’s going on.
I keep upnp off now because of it but yet they are still able to log on and switch it on and come set port forward rules from port 0 to 0 it says on the technical log.
I’m not sure if this is supposed to happen but I have a loop back on my router 127.0.0.1 and I’m pretty sure they have forced my IP to remain static.
Not only this when you go to the IPv6 settings there is no dns it says not available.
When I went on my pc it said there was no IPv6 connection at all.
Also when I do a portscan localhost using my iPhone I get the following ports open
1080
Socks
1083
Ansoft-lm-1
Anasoft license manager
8021
FTP-proxy
Common ftp proxy port.
Also I have seen something on my computer screen called teredo isatap where it says media disconnected.
I’ve had my email password blocked about 40 times this is not an exaggeration.
I think they are using Cisco equipment to link up our hubs.
When I leave the house and connect to a friends Wifi if I do a localhost scan on fing I get
1990
Stun p1 Cisco
It is saying my address assignment is static.
That IPv6 is not configured on the technical logs it has shown some unusual MAC addresses but then they disappear off the devices.
I am getting new static route added with an External IP address that hasn’t changed.
Also with this fing app you can see upnp service info.
For my router I get this
Hostname bthub
Upnp name BT Homehub 6.0A
Upnp services
WanCommonInterfaceConfig(1)
WanPPPConnection(1)
Net bios name BTHUB
File server : Yes
I am also getting NFLC Media Server show up when there is nothing except my phone connected.
I did a cmd net local group I think and it came up with IPC$ and ADMIN$ which means someone is remotely logging in as admin and is sharing files.
I have done a scan over my mums she lives across the road and they’ve tried to stop me from using her Wifi in the past.
When I do a port scan on her router she’s with virgin we get
80
Http
1900
Upnp
5000
Complex main upnp
Her upnp services then show as
Layer3Forwarding(1)
WanCommonInterfaceConfig(1)
WanIPConnection(1)
And she had a few unknown devices on there as well.
I’ve spoke to BT and they are swearing blind that I can’t be hacked it’s not possible but it seems to be all these servers popping. I have a upnp scanner on my android and randomly after some code has been changed it’s showing that they are trying to make requests using that.
I just don’t know what or who else to ask please help
SSH is a computer program based on the Secure Shell protocol. SSH provides strong, encrypted authentication and a secure encrypted tunnel through which users can execute commands and move data. The current version of Secure Shell is ssh-2. (The ssh-1 protocol is deprecated; therefore, it is highly recommended that you use ssh-2.)
For more information about Secure Shell, see “Fortified SSH: A Cost-Effective Way to Safeguard Your Network” on Attachmate.com: http://www.attachmate.com/WhitePapers/Literature_0954.htm.
Port forwarding, also known as tunneling, provides a way to redirect non-secure TCP/IP communications through a secure SSH connection. When port forwarding is configured, all data sent to a specified port is redirected through the secure channel. Most remote services that use TCP/IP can be secured, including client-server applications, database systems, and services such as HTTP, Telnet, FTP, POP3, and SMTP. The Reflection for Secure IT and Reflection clients also provide dynamic forwarding for the X11 Windows System commonly used on UNIX machines.
There are two types of port forwarding: local and remote.
Local Port Forwarding—In most cases, local port forwarding is used to forward data securely from another client application running on the same computer as the Secure Shell client. The Secure Shell client is configured to redirect data from a specified local port (on the same computer as the Secure Shell client), through the secure tunnel to a specified destination host and port. You can configure any other client running on the same computer to connect to the forwarded port (rather than directly to the destination host and port). After the Secure Shell connection is established, the Secure Shell client listens on the specified port and redirects all data sent to that port through the secure tunnel to the Secure Shell server. The server decrypts the data, and then directs it to the destination host and port.
Remote Port Forwarding—Remote port forwarding is used to forward data securely from any client application running on the same computer as the Secure Shell server. In this case, the client session requests that a specified remote port (on the same computer as the Secure Shell server) be used to redirect the data. You can configure any other client running on the same computer as the Secure Shell server to connect to the forwarded port (rather than directly to the destination host and port). After the Secure Shell connection is established, the Secure Shell server listens on the specified port and redirects all data sent to that port through the secure tunnel to the Secure Shell client. The client decrypts the data and then directs it to the destination host and port.
To tunnel TCP traffic with SSH, you must configure local or remote port forwarding (or both), establish the SSH connection, and then configure the application you want to secure to redirect its communication through the SSH tunnel.
Port forwarding is configured only by the SSH client, not the Reflection for Secure IT server. However, you can configure the server to enable or disable requests made by the client.
Before using port forwarding, ensure that the SSH server is configured to enable tunneling. How you configure the server depends on which server version and platform you are using.
Both local and remote port forwarding are enabled by default in version 7.0 or higher of the Reflection for Secure IT Server. For details about these settings, go to the product documentation page, http://support.attachmate.com/manuals/sshdocs.html. Select your product; open the Reflection for Secure IT Server Users Guide for your product version; and search for Port Forwarding.
For details on configuring other SSH server software, refer to your man pages or the product’s documentation.
The client can be configured to request local or remote port forwarding, or both.
For information about configuring the Reflection for Secure IT Client for port forwarding, go to the product documentation page, http://support.attachmate.com/manuals/sshdocs.html. Select your product; open the Reflection for Secure IT Client Users Guide for your product version; and search for Port Forwarding.
Follow the steps below to create, close, and edit an SSH tunnel using the Reflection for Secure IT Windows Client.
To create a local tunnel:
Note the following:
Important: Localhost is used for the name of the remote machine if the tcp application server you are connecting to through the tunnel is running on the same server where the SSH daemon resides, which is often the case.
If the SSH daemon resides on a different host than the host on which the tcp application is running, enter the name of the host you are connecting to in the Destination Host field. In this instance, the connection between the Reflection SSH client and the SSH daemon is secure, but the connection between the SSH daemon and the target host is not secure.
This tunnel configuration is automatically saved to the user’s config file (under SSH config scheme) and will be used again when you connect to the same host (using the same host name).
When the Reflection SSH client receives a local request on the specified source port, the application is connected to the destination port through the SSH tunnel.
To close a tunnel, terminate the host session.
To edit tunnel settings:
You can use commands to establish the SSH connection and create the SSH tunnel from the command line.
Use the following command to forward TCP traffic on the workstation through an SSH tunnel to the SSH server.
Syntax:
ssh –L <local workstation port>:localhost:<SSH server port> <user name>@<host name>
Example:
ssh –L 4000:localhost:4005 RKoa@mySSHserver
In the example above, TCP traffic will be forwarded through port 4000 on the workstation to port 4005 on the SSH server.
After creating the SSH tunnel by following the procedure in Step II, you must configure your application to use the SSH tunnel. The configuration will be different for each application. For details, refer to the application documentation.
The following example shows how to configure Reflection for HP or Reflection for UNIX and OpenVMS to redirect a Telnet session over the port you have redirected to connect through SSH.
To verify that your Telnet session is running through the SSH tunnel, follow these steps.
Note: If the netstat command is not recognized, navigate to the C:WindowsSystem32 directory and enter the command again.
If the port forwarding is successful, you should see a response similar to the following:
Active Connections Proto Local Address Foreign Address State TCP My_PC:1554 my.server.com:22 ESTABLISHED TCP My_PC:1025 localhost:1564 ESTABLISHED TCP My_PC:1564 localhost:1025 ESTABLISHED |
In the example above, the first TCP row shows the SSH connection from port 1554 (a random port) on the workstation to port 22 (the default SSH port) on the SSH server.
The second and third TCP rows show the Telnet connection between port 1025 on the workstation, the port that has been configured to redirect Telnet connections (port 23) through the SSH tunnel (port 22), and a random port (1564) on the SSH server.
Note: If the second or third TCP row shows the actual host name, such as my.server.com:telnet(23), instead of localhost:<port number>, the tunnel has failed and the Telnet connection is not encrypted.
The following sample settings show how to forward HTTP.
Field |
Data |
Local forward |
8080 Note: This number can be any port number over 1024. |
To remote |
localhost |
Port |
80 |
Your HTTP connection is now going through the SSH tunnel.
I have owncloud installed on a local server at the office located at a buisness incubator and a web site with a domain name on a remote server.
Current installation:
I can access owncloud installation using incubarot’s ip/port 123.123.456.789:1234 and a local ip 192.168.17.98:80
My goal is to be able to access owncloud using a sub domain owncloud.example.com/
Is this configuration possible?
I’m stuck at connecting to my SearchGuard-proteced ElasticSearch instance inside the company network from my local machine at home. I’m using a local SSH forward same as I got working for a phpMyAdmin instance.
My ~/.ssh/config contains these:
Host workstation-forward-phpmyadmin
LocalForward localhost:8080 $WORKSTATION:443
HostKeyAlias $GATEWAY
Hostname $GATEWAY
ExitOnForwardFailure yes
User oschluet
Host workstation-forward-elasticsearch
LocalForward localhost:9200 $WORKSTATION:9200
HostKeyAlias $GATEWAY
Hostname $GATEWAY
ExitOnForwardFailure yes
User oschluet
I engage these in a screen
-session like so:
ssh workstation-forward-elasticsearch
or ssh workstation-forward-phpmyadmin
and detach the screen.
Now I can access the phpMyAdmin through my browser by accessing https://localhost:8080
or use telnet to talk to the web server directly.
Unfortunately there seems to be an issue with ElasticSearch in this regard. From a different machine inside the company network I can access the ElasticSearch like this:
oschluet@ravenwood:~$ curl -k https://$WORKSTATION:9200 --user $user:$pass
{
"name" : "redacted",
"cluster_name" : "redacted",
"cluster_uuid" : "redacted",
"version" : {
"number" : "5.1.1",
"build_hash" : "5395e21",
"build_date" : "2016-12-06T12:36:15.409Z",
"build_snapshot" : false,
"lucene_version" : "6.3.0"
},
"tagline" : "You Know, for Search"
}
Using the same credentials locally yields nothing:
[oschlueter@B5400 ~]$ curl -k https://localhost:9200 --user $user:$pass
# nothing happens
Using no credentials:
oschluet@ravenwood:~$ curl -k https://$WORKSTATION:9200
Unauthorized
[oschlueter@B5400 ~]$ curl -k https://localhost:9200
# again nothing
However telnet opens a connection:
[oschlueter@B5400 ~]$ telnet localhost 9200
Trying ::1...
Connected to localhost.
Escape character is '^]'.
I tried having ElasticSearch listen on the ip address, the hostname and 0.0.0.0
which all allowed me to connect from the other machine inside the network however no connection from my local machine could be established. I’m admin of $WORKSTATION and of my local machine. Could anyone help me locate the issue please?
I have a set of services where I’d like to set IP based ACLs (whitelist) for one, but not for the other. The issues seems to show up as the services run on the same port internally (port 80) but I use different ports on the gateway to access them.
Port 8088 on Gateway -> Port 80 on 10.0.0.A (with IP whitelist) Port 80 on Gateway -> Port 80 on 10.0.0.B
And I can get this to work with everything open with the following rules:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8088 -j DNAT --to 10.0.0.A:80 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 10.0.0.B iptables -A FORWARD -p tcp -i eth0 --dport 80 -j ACCEPT
The issue is that the FORWARD ACCEPT rule covers both of these nat rules, as they seem to be based on the destination port (–dport 80), instead of the incoming port on the gateway (80 vs 8088).
I can’t figure out how to rewrite the FORWARD rule into 2 separate rules so that I can have different behaviour for connections coming into the gateway on 80 vs 8088.
Additional info:
lsb_release -d Description: Debian GNU/Linux 7.5 (wheezy) iptables --version iptables v1.4.14
1st Solution Attempt
I have been able to spin off a chain and perform the routing there, but I am unable to add the ACL (reject) line due to the following error message:
x_tables: ip_tables: REJECT target: only valid in filter table, not nat
Here’s what I put in:
iptables -t nat -N Whitelist iptables -t nat -A Whitelist -p tcp -j DNAT --to 10.0.0.A:80 iptables -t nat -A Whitelist -s <whatsmyip.org> -j RETURN iptables -t nat -A Whitelist -j REJECT iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8088 -j Whitelist
Everything works fine until line 4, where the REJECT inside nat fails. If I comment the REJECT line out, I can confirm that the remainder of the logic works and the port becomes open to the wild because nothing is rejected.
Next Solution Attempt
Seem to be tripping up on the original issue while working with a properly setup separate chain. The PREROUTING rule changing the port right off the top still seems to cause an issue with the non-nat ACL attempt. The ACL rules have no effect and the port is open to the wild.
iptables -N Whitelist iptables -A Whitelist -s <whatsmyip.org> -j RETURN iptables -A Whitelist -j REJECT iptables -A INPUT -i eth0 -p tcp --dport 8088 -j Whitelist iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8088 -j DNAT --to 10.0.0.A:80
Current Investigation
Try to move the port change to something after the ACL check, after the nat prerouting.
I have in my ~/.ssh/config
file entries with local forward definitions like
HOST myServer
hostname 10.10.0.1
user xyz
LocalForward 8080 localhost:80
LocalForward 4000 127.0.0.1:4000
...
This works like a charm, but I also have scripts to synchronize some data.
These scripts show many warnings when they try to connect to the server while there is already a connection.
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8080
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 4000
....
Is there a neat way to use ssh
or rsync
with an option to disable all local forwards for a session?
Obviously I could copy&paste each config block and build one with and one without local forwards, but I hope there is a better solution.