Static IP & Port Forward : How do I setup if internet is forwarded through laptop?

Mushin0

Junior Member
Feb 17, 2017
3
0
1
Hey guys,

So I have a bit of a complicated system right now and I am trying to make it so that I can have an Open NAT type in the game For Honor.

Because I failed to buy a wireless card for my desktop (and I am currently too broke to purchase one) I have my Ubuntu laptop passing it's wireless internet through to my desktop via ethernet.

I first tried to setup my router to just forward the ports:
https://portforward.com/help/for-honor-nat-type-open/
pvls6Pj.png


This did not change my NAT type and I think the issue is because of my laptop acting as a gateway.

I am going through the settings here to setup a static ip address:
https://portforward.com/pace-plc/5268ac/
https://portforward.com/networking/static-ip-windows-10.htm

And when I changed the IPv4 settings I could not connect to the internet (because I have essentially two gateways). I know next to nothing about computer networking but I am more than willing to learn and try around with things if someone wouldn't mind helping me figure out how to make this work (either how to setup a static IP/port forward in this situation or how to achieve an Open NAT type.

I appreciate any help, thank you.
 

Rifter

Lifer
Oct 9, 1999
11,522
751
126
You will likely need to get rid of your double NAT setup and get a single NAT setup working. Basically you need to only have one router. Since your ubuntu laptop is already setup as a router by the sounds of it i would probably keep it as the router setup your wireless router as just a access point and make sure your ISP modem is set to bridge mode and connect it directly to the laptop.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
A long time ago, I helped my nephew do something similar from a Windows desktop PC with WiFi so he could get a wired connection to his XBOX 360. The XBOX got DHCP from the router, and presumably it could open ports automatically using UPnP.
 

ylin0811

Member
Jun 1, 2015
105
6
46
You should be able to forward the traffic through 1:1 nat or port forwarding by using iptables on linux. Something like the following 1:1 nat as an example:

echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig wlan(x):0 192.168.1.254 netmask 255.255.255.0 up
ifconfig eth<x> 10.255.255.1 netmask 255.255.255.0 broadcast 10.255.255.255
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
iptables -t nat -A POSTROUTING -o wlan(x):0 -s 10.255.255.2 -j SNAT --to-source 192.168.1.254
iptables -t nat -A PREROUTING -i wlan(x):0 -d 192.168.1.254 -j DNAT --to-destination 10.255.255.2

192.168.1.x = This is assuming your router is giving out 192.168.1.x address to your internal lan. Modify if necessary.

If you don't know how to apply iptables, read the ubuntu documentation and it should get you started.

I am not sure if this will get you open nat type, but is worth a try.