Convert LAN port as WAN on TP-link WR841N v8?

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
pauru31
Posts: 2
Joined: Sun Jun 18, 2017 10:23 pm

Convert LAN port as WAN on TP-link WR841N v8?

Post by pauru31 »

Hi, I just want to convert my LAN port as WAN on my TP-link router because I think my WAN is broken after a storm. I tried to change the code in my etc/config/network using WinSCP but after doing that I cannot access my default gateway to enter Gargoyle anymore. What seems to be the problem? I'm thinking I put wrong code. Can someone help me with the right code.

The code of my etc/config/network

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd15:981e:6c8a::/48'

config interface 'lan'
option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.2.1'
option dns '192.168.2.1'

config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
option ipv6 '0'

config interface 'wan6'
option ifname 'eth0'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4'


Thanks.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Convert LAN port as WAN on TP-link WR841N v8?

Post by Lantis »

Code: Select all

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd15:981e:6c8a::/48'

config interface 'lan'
	option ifname 'eth0.1'
	option force_link '1'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.2.1'
	option dns '192.168.2.1'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option ipv6 '0'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '0t 1 2 3'
	
	config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '2'
	option ports '0t 4'
Something along those lines will work.
Perhaps you could have googled the solution?
https://wiki.openwrt.org/toh/tp-link/tl-wr841nd
https://forum.openwrt.org/viewtopic.php?id=63371
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pauru31
Posts: 2
Joined: Sun Jun 18, 2017 10:23 pm

Re: Convert LAN port as WAN on TP-link WR841N v8?

Post by pauru31 »

Thanks for the code sir. I updated the etc/config/network but after that I cannot connect to my default gateway to enter gargoyle anymore in my wired computer. If I try to go to my default gateway it always says "site can't be reached" but if through wifi I can go to gargoyle overview. I really have no idea what is causing the problem. Hope you can help me sir. Thank you.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Convert LAN port as WAN on TP-link WR841N v8?

Post by Lantis »

Have you tried a different LAN port?
Note that the numbers in the config file DO NOT match the numbers printed on the device.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Convert LAN port as WAN on TP-link WR841N v8?

Post by Lantis »

Also, after making the changes you are restarting the network right?

/etc/init.d/network restart
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply