Got it

The Web LCT works abnormally due to port mapping failure

Latest reply: Aug 8, 2019 18:51:49 677 4 3 0 0

Hello, everyone. Today, I will analyze a port mapping problem.


Fault Description

On the U2000 V200R014C60, a user opens the NE Explorer but finds that:

1.In the case of an OSN 9800 U32, the error message "Unable to connect. Firefox can't establish a connection to the server atXXX." is displayed.

image002.jpg

2.In the case of a WDM or SDH NE,WDM Interfaceis absent from the navigation tree or "Failed to connect with WebServer" is displayed in the lower left corner.


Problem Identification

Linux has lost the mapping rules for ports 80 and 443 in the ip tables.


Cause Analysis

1.       Log in to the OS as the oss user run the daem_ps command to view all httpd services.


image003.jpg


2.Test the CAU by entering https://U2000 server IP address/cauin the address box of Internet Explorer.

The CAU tool is not available.

3.Test the CLI by entering telnet IP address 80.

Port 80 cannot be connected in telnet mode.

4.  Log in to the Linux OS as the root user and run the following commands:

/usr/sbin/iptables -t nat -L | grep 31837

/usr/sbin/iptables -t nat -L | grep 31838

If errors are reported or no information is returned in all the preceding steps, the mapping rules for ports 80 and 443 are lost. The http services of the U2000 are not running, and related functions are unavailable


Solution

Because the ip tables is written in the kernel, it does not store port mapping rules permanently. Instead, port mapping rules are lost after OS restart. To address this issue, you have to add the port mapping rules, as follows:

1.   Run the following commands to add the port mapping rules:

/usr/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 31837

/usr/sbin/iptables -t nat -A OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-ports 31837

/usr/sbin/iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 31838

/usr/sbin/iptables -t nat -A OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-ports 31838

2.   Run the following commands to save the iptables information to a file:

iptables-save> /opt/oss/iptables.save

3.     Add the following command to the/etc/init.d/boot.localfile:

iptables-restore /opt/oss/iptables.save

4.     Log in to the Linux OS as the rootuser and query the port mapping rules again.

The rules ware present.

image004.jpg

Suggestion and Summary

1.Before making any rectification on the live network, ask Huawei U2000 R&D engineers to review the rectification plan to ensure that the rectification will cause no adverse impact on the U2000.

2.Collect the following information when necessary:

      OS logs:var\log\message*

      Information returned by the supportconfig command:var/log/nts_*

image005.jpg

Thank you for sharing.
View more
  • x
  • convention:

Thank you share, very useful!The Web LCT works abnormally due to port mapping failure-3026479-1
View more
  • x
  • convention:

The Web LCT works abnormally due to port mapping failure-3026501-1
View more
  • x
  • convention:

Thank you 4 shared!
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.