Archive for 2017-07-25

How to modify a class file

You can follow these steps to modify your java class:

  1. Decompile the .class file as you have done and save it as .java
  2. Create a project in Eclipse with that java file, the original JAR as library, and all its dependencies
  3. Change the .java and compile
  4. Get the modified .class file and put it again inside the original JAR.

Iptables speciális IPről speciális port-ra forwardolás

Tesztelt / Tested:

Source interface: eno1
Target IP:

Source Port: 922
Target port: 22

iptables -A PREROUTING -i eno1 -p tcp -m tcp --dport 922 -j DNAT --to-destination
iptables -A FORWARD -d -p tcp -m tcp --dport 922 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT



iptables -t nat -A PREROUTING -s <DPX_IP> -p tcp --dport 80 -j DNAT --to-destination <VPS_IP>:8888
iptables -t nat -A POSTROUTING -s <VPS_IP> -p tcp --dport 8888 -j DNAT --to-destination <DPX_IP>:80