Я довольно новичок в этом, поэтому я мог бы пропустить что-то совершенно очевидное, но я не могу подключиться к своему серверу с помощью внешнего IP-адреса. Внутри все работает как сон (10.0.0.28/redmine), но когда я пытаюсь подключиться с помощью внешнего IP, время ожидания запросов. Я отправил оба порта ssh и порт 80, как показано ниже, но это не решило проблему. Теперь мои порты отображаются как открытые с www.portchecktool.com.Сервер Ubuntu (apache) не отвечает на внешние запросы
SSH работает нормально внутри, но когда я выдаю команду, показанную здесь, он говорит, что соединение закрыто удаленным хостом.
ssh {my external ip} -pxxxx -i /home/millerir/.ssh/id_rsa -l imiller
Точно так же, когда я перейти к {Мой IP}/{Redmine или мой ф} или {my_ip}: 80 или мой адрес службы DDNS я получаю сброс соединения при попытке подключения ошибки из моего браузера.
Я проверил, что сервер прослушивает порт 80 и мой порт ssh, как показано ниже.
[email protected]:/etc/apache2/sites-available$ sudo netstat -tulpn | grep LISTEN
tcp 0 0 0.0.0.0:xxxx 0.0.0.0:* LISTEN 779/sshd
tcp 0 0 127.0.0.1:57384 0.0.0.0:* LISTEN 1192/redmine
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 862/mysqld
tcp6 0 0 :::xxxx :::* LISTEN 779/sshd
tcp6 0 0 :::80 :::* LISTEN 923/apache2
Если бы кто-нибудь мог мне помочь, что было бы весьма полезно. Я застрял и не знаю.
redmine.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin [email protected]
#DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
DocumentRoot /var/www
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymLinksInDocumentRoot on
</Directory>
</VirtualHost>
http.conf
<Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
Видимо, я не хватает репутации размещать фотографии пока :(но я сделал все возможное, чтобы включить текст или мои настройки переадресации портов. Service Name \t Тип \t \t Start Port End Port \t сервер IPv4 сервер IPv6 \t Активный \t WebServer \t TCP/UDP 10.0.0.28 \t \t ServerSSH \t TCP/UDP \t \t хх хх \t 10,0 .0.28 – Ian