0

I am new to ubuntu and I am trying to learn how to open a port in the ubuntu. After some hours of research and failed attempts, I gave up and came here to you.

I was able to change my IP through the UI (static ip) but was never able to do through command line, i'll research a bit more later, but even so, it worked here. Here is my ifconfig:

andre@Sith:/$ ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4002 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4002 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:710557 (710.5 KB)  TX bytes:710557 (710.5 KB)

wlan0     Link encap:Ethernet  HWaddr c0:cb:38:26:ee:21  
          inet addr:192.168.100.90  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::c2cb:38ff:fe26:ee21/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:717887 errors:0 dropped:0 overruns:0 frame:0
          TX packets:489393 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:995681482 (995.6 MB)  TX bytes:45808958 (45.8 MB)

The ip is correct and matching the one in the DMZ. I also did enabled in the router the 8080 port, just in case.

This same configuration was working in windows (2 days ago before I format to linux, want to explore), but not for ubuntu.

I spotted in one of the tutorials that I went through that we should enable the port in linux even though it is already in the dmz, so, I did as it said:

andre@Sith:/opt$ sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
andre@Sith:/opt$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

But I am still unable to see it. The port 8080 is running an instance of wildfly 9.0 and it is running as expected.

What am I missing here? Thanks :)

0

Well, after lots of tries, I found out what the issue was.
Since my internal IP is in the DMZ, there is no need to enable it in the firewall, only the blockage.

Wildfly blocks the access to it if not configured in the standalone.xml, so, I just changed it to allow any ipv4 address:

 <interfaces>
        <interface name="management">
            <any-address/>
        </interface>
        <interface name="public">
            <any-address/>
        </interface>
        <interface name="unsecure">
            <any-address/>
        </interface>
    </interfaces>

Once this is done and the wildfly restarted, the issue was gone and I was able to check my port.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.